[require] GL >= 2.0 GLSL >= 1.10 [vertex shader] void main() { gl_Position = gl_Vertex; } [fragment shader] float val = 0.0; void sub() { for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { if (i == 1 && j == 1) return; val = 0.5; } } val = 1.0; } void main() { sub(); gl_FragColor = vec4(val); } [test] draw rect -1 -1 2 2 probe all rgb 0.5 0.5 0.5 0.5