summaryrefslogtreecommitdiffstats
path: root/progs/vpglsl/nestedswizzle.glsl
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2007-10-25 07:52:59 -0400
committerZack Rusin <[email protected]>2007-10-25 09:04:41 -0400
commit1d26e9c447fd9746b2219edbf65b1991521bcfe7 (patch)
treeb590bb2bbbe9ce240c55981a9ed559d407cc4055 /progs/vpglsl/nestedswizzle.glsl
parente842b5e5ba738cd214137cca95c6da64492f9f92 (diff)
Fix nested conditionals
Diffstat (limited to 'progs/vpglsl/nestedswizzle.glsl')
-rw-r--r--progs/vpglsl/nestedswizzle.glsl9
1 files changed, 9 insertions, 0 deletions
diff --git a/progs/vpglsl/nestedswizzle.glsl b/progs/vpglsl/nestedswizzle.glsl
new file mode 100644
index 00000000000..a3adb3dfeb2
--- /dev/null
+++ b/progs/vpglsl/nestedswizzle.glsl
@@ -0,0 +1,9 @@
+
+void main() {
+ gl_Position = gl_Vertex;
+ gl_FrontColor = gl_Color;
+ if (gl_Position.x < 0.5) {
+ gl_FrontColor.y = 1.0;
+ }
+ gl_FrontColor.xzw = vec3(0, 0, 1);
+}