[require] GLSL >= 1.10 [vertex shader] void main() { gl_Position = gl_Vertex; } [fragment shader] uniform int i; void main() { gl_FragColor = vec4(gl_NormalMatrix[i], 0.0); } [test] clear color 0.5 0.5 0.5 0.5 clear uniform int i 0 draw rect -1 -1 0.5 2 uniform int i 1 draw rect -0.5 -1 0.5 2 uniform int i 2 draw rect 0 -1 0.5 2 relative probe rgba (0.125, 0.5) (1.0, 0.0, 0.0, 0.0) relative probe rgba (0.375, 0.5) (0.0, 1.0, 0.0, 0.0) relative probe rgba (0.625, 0.5) (0.0, 0.0, 1.0, 0.0)