framework/replay: update renderdoc against v1.20
[piglit.git] / tests / spec / arb_cull_distance / clip-cull-2.shader_test
blob765799e9e66387592025002518569c87b71d9246
1 # Use a clip and cull distances. Never cull, clip triangle 0 between
2 # vertices 0 and 1.
4 [require]
5 GLSL >= 1.30
6 GL_ARB_cull_distance
8 [vertex shader]
9 #version 130
10 #extension GL_ARB_cull_distance: enable
12 out float gl_CullDistance[1];
13 out float gl_ClipDistance[1];
15 void main(void)
17         gl_Position = gl_Vertex;
19         gl_CullDistance[0] = 5.0;
20         gl_ClipDistance[0] = gl_VertexID - 1;
23 [fragment shader]
24 #version 130
26 void main(void)
28         gl_FragColor = vec4(0, 0, 1, 1);
31 [test]
32 clear color 0.0 1.0 0.0 1.0
33 clear
34 enable GL_CLIP_PLANE0
35 draw rect -1 -1 2 2
37 # Bottom left corner is green because triangle 0 was clipped between
38 # vertex 0 and 1.
39 relative probe rgba (0.100, 0.100) (0.0, 1.0, 0.0, 1.0)
41 # Top left corner is blue because triangle 0 was clipped between
42 # vertex 0 and 1.
43 relative probe rgba (0.100, 0.900) (0.0, 0.0, 1.0, 1.0)
45 # Top right corner is blue because triangle 1 was not culled or clipped
46 relative probe rgba (0.900, 0.900) (0.0, 0.0, 1.0, 1.0)