conversion-explicit: use a different value for normalized +/- min
[piglit.git] / tests / spec / arb_cull_distance / vs-cull-distance-vertex-inside-cull-volume.shader_test
blobaf1e7f575bbbed8bdd53c0844be9148f2bb64af4
1 # Use one gl_CullDistance values to _not_ "cull" away a vertex with a positive
2 # value supplied to gl_CullDistance.
4 # The gl_CullDistance variable provides a mechanism for controlling user
5 # culling. The element gl_CullDistance[i] specifies a cull distance for each
6 # plane i. A distance of 0.0 means that the vertex is on the plane, a positive
7 # distance means that the vertex is insider the cull volume, and a negative
8 # distance means that the point is outside the cull volume. Primitives whose
9 # vertices all have a negative clip distance for plane i will be discarded.
11 [require]
12 GLSL >= 1.30
13 GL_ARB_cull_distance
15 [vertex shader]
16 #version 130
17 #extension GL_ARB_cull_distance: enable
19 out float gl_CullDistance[1];
21 void main(void)
23         gl_Position = gl_Vertex;
24         gl_CullDistance[0] = 1;
27 [fragment shader]
28 #version 130
30 void main(void)
32         gl_FragColor = vec4(0, 1, 0, 1);
35 [test]
36 clear color 1.0 0.0 0.0 1.0
37 clear
38 draw rect -1 -1 2 2
39 probe all rgba 0.0 1.0 0.0 1.0