[require] GLSL >= 1.10 [vertex shader] void main() { gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; } [fragment shader] void main() { float sum; vec3 c = vec3(0.0); for(sum = 10.0; sum >= 4.5; sum -= 1.0){ c.x += 0.1; } for(sum = 10.0; sum >= 5.0; sum -= 1.0){ c.y += 0.1; } for(sum = 10.0; sum >= 5.5; sum -= 1.0){ c.z += 0.1; } gl_FragColor = vec4(c, 1.0); } [test] draw rect -1 -1 2 2 probe rgb 1 1 0.6 0.6 0.5