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.
17 #extension GL_ARB_cull_distance: enable
19 out float gl_CullDistance[1];
23 gl_Position = gl_Vertex;
24 gl_CullDistance[0] = 1;
32 gl_FragColor = vec4(0, 1, 0, 1);
36 clear color 1.0 0.0 0.0 1.0
39 probe all rgba 0.0 1.0 0.0 1.0