summaryrefslogtreecommitdiff
path: root/progs/vpglsl/nestedifs.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'progs/vpglsl/nestedifs.glsl')
-rw-r--r--progs/vpglsl/nestedifs.glsl13
1 files changed, 13 insertions, 0 deletions
diff --git a/progs/vpglsl/nestedifs.glsl b/progs/vpglsl/nestedifs.glsl
new file mode 100644
index 0000000000..abb235cd65
--- /dev/null
+++ b/progs/vpglsl/nestedifs.glsl
@@ -0,0 +1,13 @@
+
+void main() {
+ gl_Position = gl_Vertex;
+ if (gl_Position.x < 0.5) {
+ if (gl_Position.y < 0.20) {
+ gl_FrontColor = vec4(1.0, 0.0, 0.0, 1.0);
+ } else {
+ gl_FrontColor = vec4(0.0, 1.0, 0.0, 1.0);
+ }
+ gl_FrontColor.y = 1.0;
+ } else
+ gl_FrontColor = gl_Color;
+}