[require] GLSL >= 1.10 [vertex shader file] glsl-mvp.vert [fragment shader] void main() { int j = 0; float g = 0.0; for (int i = 0; i < 3; i++) { if (j > 9) break; g += 0.2; j++; } gl_FragColor = (j != 3) ? vec4(1.0, 0.0, 0.0, 0.0) : vec4(0.0, g, 0.0, 0.0); } [test] clear color 0.3 0.3 0.3 0.0 clear ortho draw rect 10 10 10 10 probe rgb 15 15 0.0 0.6 0.0