[require] GLSL >= 1.10 [vertex shader] void main() { gl_Position = gl_Vertex; vec4 colour = vec4(0.0, 0.0, 0.0, 1.0); int i = 0; do { if (i == 1) { colour.g = 1.0; break; } i++; } while (i < 2); gl_FrontColor = colour; } [fragment shader] void main() { gl_FragColor = gl_Color; } [test] clear color 0.5 0.5 0.5 0.5 draw rect -1 -1 2 2 probe all rgba 0.0 1.0 0.0 1.0