diff options
Diffstat (limited to 'progs/vpglsl/ifelse.glsl')
-rw-r--r-- | progs/vpglsl/ifelse.glsl | 8 |
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; +} |