-
I can't seem to figure out. #ifdef GL_ES
precision mediump float;
#endif
void main() {
gl_FragColor = vec4(1.0);
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, thanks for asking! To execute a fragment shader and see the result, one has to create a few items in the session window (like a target to render to, a shader program and a render call). You should add a "#version 120" in the first line (since you are using gl_FragColor). |
Beta Was this translation helpful? Give feedback.
Hi, thanks for asking!
GPUpad is very flexible but makes the simple things still a little bit complicated. I will think about how this can be simplified!
To execute a fragment shader and see the result, one has to create a few items in the session window (like a target to render to, a shader program and a render call).
For now it is easiest, to start with a sample from the Help menu and edit the shader. The simplest one is the sample "Quad". If you open it, and have a look at the session window, there is an item "Program", which you can double click to open it's vertex and fragment shaders. In the fragment shader you can paste your code.
You should add a "#version 120" in the first line (…