We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello !
I just create some classes to be able to write GLSL directly inside a java class to be able to create OOP-shader-structure. Everything works fine but I would like to represents exactly the 6 processing shaders, then I'll just have to extend it to create my own shader (as Processing works actually)
I follow that great tutorial https://www.processing.org/tutorials/pshader/
And I rebuild the shaders I found in the tutorial using my tool. Everythings worked just fine, the GLSL code generated is exactly the same than the one found in the tutorial but the results on the screen are almost the results I got with "true-processing-shader" but not exactly.
For example, the quality of the lineShader described in the tutorial is ugly. Or, in the light-shader, the inner-part of the mesh doesn't look like to be illuminate in a correct way.
The problem doesn't come from my tool because at the end the GLSL I'm using is the exact same as the one given in the tutorials.
I suppose that the GLSL given in the tutorials are just an approximation of the true GLSL code.
Then my question is "Where can I find the true GLSL code for the 6 shaders used in Processing ?"
Thanks a lot by advance !
Answers
just to be sure, maybe I'm missing something....
Here is the glsl of my vertexShader
the one of my fragmentShader :
And the (eclipse-)processing-code I'm using
public class Example07 implements IExample{
}
(the left picture was done with a "true-processing-shader" and the right picture uses the pointShader GLSL code given in the tutorial)
And, if you are curious to see how looks like the ProcessingLineShader class
Found ! https://github.com/processing/processing/tree/master/core/src/processing/opengl
Nice research! If you will find a way for simplify the coding for beginner user of GLSL shader as me, it will be great!
I'm working on it :) The main obstacle with Shader come from the division of the code in differents individual part (vertexShader / fragmentShader / buffer creation / top-level usage of the shader )
I would like to join every part of the shader-process in a single java class, then the shader will contains its own buffers and it becomes possible to extends the shader to another shader without buffer-missing-issue.
I already did it in JS/WebGL , it's a bit more tricky in Java but I think I will get it working soon :)