summaryrefslogtreecommitdiffstats
path: root/progs/vpglsl/nestedifs.glsl
blob: abb235cd65bdaef49f3db7ad9ec37e861462e38e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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;
}