summaryrefslogtreecommitdiffstats
path: root/progs/vpglsl/ifelse.glsl
blob: 645b2117a17e052df5022593661ed28991e7a01a (plain)
1
2
3
4
5
6
7
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;
}