diff options
Diffstat (limited to 'hello.frag')
-rw-r--r-- | hello.frag | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -1,13 +1,9 @@ #version 330 core -out vec4 FragColor; + +#define WIDTH 800 +#define HEIGHT 600 void main() { - FragColor = vec4(1.0f, 0.5f, 0.2f, 1.0f); + gl_FragColor = vec4(gl_FragCoord.x / WIDTH, gl_FragCoord.y / HEIGHT, 0, 1); } -// #version 330 core -// -// void main() { -// gl_FragColor = vec4(gl_FragCoord.xy, 0, 1); -// } -// |