[require] GLSL >= 1.10 [vertex shader] void main() { gl_Position = gl_Vertex; } [fragment shader] uniform vec4 v; void main() { gl_FragColor = v; if (v.x < 1.0 || v.y > 0.0 || v.z < 1.0) return; // should always return gl_FragColor = vec4(1.0) - v; } [test] uniform vec4 v 0 1 0 1 draw rect -1 -1 2 2 probe all rgba 0 1 0 1