summaryrefslogtreecommitdiff
path: root/progs/vpglsl/ifelse.glsl
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2007-10-25 07:19:02 -0400
committerZack Rusin <zack@tungstengraphics.com>2007-10-25 09:04:41 -0400
commite842b5e5ba738cd214137cca95c6da64492f9f92 (patch)
treedddb448593e4152852d9a6437731d27e953f7e21 /progs/vpglsl/ifelse.glsl
parent7073ef96824242669735a8681519e1a0cee14309 (diff)
Test some functionality of vp using GLSL that pure vp isn't testing.
Diffstat (limited to 'progs/vpglsl/ifelse.glsl')
-rw-r--r--progs/vpglsl/ifelse.glsl8
1 files changed, 8 insertions, 0 deletions
diff --git a/progs/vpglsl/ifelse.glsl b/progs/vpglsl/ifelse.glsl
new file mode 100644
index 0000000000..645b2117a1
--- /dev/null
+++ b/progs/vpglsl/ifelse.glsl
@@ -0,0 +1,8 @@
+
+void main() {
+ gl_Position = gl_Vertex;
+ if (gl_Position.x < 0.5)
+ gl_FrontColor = vec4(1.0, 0.0, 0.0, 1.0);
+ else
+ gl_FrontColor = gl_Color;
+}