summaryrefslogtreecommitdiffstats
path: root/progs/vpglsl/if.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'progs/vpglsl/if.glsl')
-rw-r--r--progs/vpglsl/if.glsl7
1 files changed, 7 insertions, 0 deletions
diff --git a/progs/vpglsl/if.glsl b/progs/vpglsl/if.glsl
new file mode 100644
index 00000000000..174f69c19c9
--- /dev/null
+++ b/progs/vpglsl/if.glsl
@@ -0,0 +1,7 @@
+
+void main() {
+ gl_FrontColor = gl_Color;
+ gl_Position = gl_Vertex;
+ if (gl_Position.x < 0.5)
+ gl_FrontColor = vec4(1.0, 0.0, 0.0, 1.0);
+}