glsl-array-bounds: set out-of-bounds array index inside shader
[piglit.git] / tests / shaders / glsl-clamp-vertex-color.shader_test
blob76262a73c8c3342de26889a566d42a273f8c4cb8
1 [require]
2 GLSL >= 1.10
4 # GL_ARB_color_buffer_float provides a way to disable vertex color clamping,
5 # but without it, the vertex colors must be clamped.
7 [vertex shader]
8 void main()
10         gl_Position = ftransform();
11         gl_FrontColor = vec4(-2, -1, 0.5, 3);             /* (0, 0,   0.5, 1) */
12         gl_FrontSecondaryColor = vec4(2, 0.5, 1.5, -0.5); /* (1, 0.5, 1,   0) */
15 [fragment shader]
16 uniform vec4 arg0;
17 void main()
19         gl_FragColor = (gl_Color + gl_SecondaryColor) * 0.5;
22 [test]
23 draw rect -1 -1 2 2
24 probe rgba 1 1 0.5 0.25 0.75 0.5