aboutsummaryrefslogtreecommitdiff
path: root/hello.frag
diff options
context:
space:
mode:
Diffstat (limited to 'hello.frag')
-rw-r--r--hello.frag12
1 files changed, 4 insertions, 8 deletions
diff --git a/hello.frag b/hello.frag
index a804a77..291c0f1 100644
--- a/hello.frag
+++ b/hello.frag
@@ -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);
-// }
-//