[require] GLSL >= 1.30 [vertex shader] #version 130 in vec4 piglit_vertex; out vec4 color; vec4 temps[3]; vec4 temps3[3]; void main() { temps[0] = vec4(1 , 0.50, 0.60, 0.90); temps[1] = vec4(2 , 0.30, 0.70, 0.90); temps[2] = vec4(0 , 0.15, 0.25, 0.90); temps3[0] = vec4(1, 0.30, 0.40, 0.50); temps3[1] = vec4(2, 0.40, 0.50 ,0.60); temps3[2] = vec4(0, 0.50, 0.60, 0.70); color = temps[int(temps3[int(temps[int(temps3[0].xxxx)].xxxx)].xxxx)]; gl_Position = piglit_vertex; } [fragment shader] #version 130 in vec4 color; void main() { gl_FragColor = color; } [test] clear color 0.0 0.0 0.0 0.0 clear ortho draw rect -1 -1 2 2 probe rgba 2 2 1.0 0.5 0.6 0.9