We are about to switch to a new forum software. Until then we have removed the registration on this forum.
As a very confused opengl beginner complete beginner who is struggling to get started I have a few questions.
Is it possible to use GLSL directly in processing or do you need to port to PShader?
Is there any tutorial for how to port shaders to PShader or use publicly available shaders? I want to start learning opengl shaders, but I don't know where to start since it seems like everywhere I can find examples, the language or implementation is different from what processing uses.
2.5 How do I take a shader for shadertoy and play around with it in processing?
Is there anybody making easy to follow tutorials like Dan Shiffman does for shaders?
How universal are shaders? For example, if I learn how to do shaders in processing can I take those and use them with openframeworks for example?
Answers
If you browse the forum for shaders, you can find many attempts of people trying to get shaders working, either basic ones or complex ones. Trying to implement shaders is counter to the Processing concept aka. making things easier.
Other tags to search in the forum: post by the user nabr, as he has been and active member embracing shader technology.
If you google codeanticode, he also has some web resources and some intro material, similar to what you find in the Processing website under tutorials: Shader chapter.
Exporting shader from opemframeworks or shader toys: not sure if that is easy. My understanding reading from different prev posts, you need to understand how Processing does its magic with OpenGL. Then if you integrate your shader, you will need to use terms as defined in Processing. Take this with a grain of salt as I do not have much experience. You can explore the Processing source code to see how Processing works and, after taking a guide tour in openframeworks, you can see better if such exporting/importing codes would work.
Hopefully other forum members will provide a better insight. Even write better documentation. On a good news, there is a potential one of the GSOC projects could provide a window to directly work with OpenGL in the PDE. We just need to wait and see what projects are accepted.
Kf
Doing some searching I found there used to be a library called GL Graphics http://glgraphics.sourceforge.net/, but it was last updated in 2011. Is there anything like that which exists for processing 3? It looks like pixel flow might have some of that capability but I'm getting a lot of bugs. For example, if surface.setResizable(true);, nothing will be rendered until the window is resized. And the mouse cordinates are wrong on the y axis, only having effect on the bottom 1/4 or so of the screen. Also, not sure how to pass values for custom variables into the shader.
I have been able to port shaders from ShaderFrog successfully. Let me know if you still need help @BGADII
I'm still very much interested in how to do it. I'm still not entirely sure where to start or what resources to use. I haven't really done anything since I played around with the ports from pixel flow. Ideally I want something that can work on android eventually.