# Use a second cull distance and set it to always reject. [require] GLSL >= 1.30 GL_ARB_cull_distance [vertex shader] #version 130 #extension GL_ARB_cull_distance: enable out float gl_CullDistance[2]; void main(void) { gl_Position = gl_Vertex; gl_CullDistance[0] = gl_VertexID - 3; gl_CullDistance[1] = -5.0; } [fragment shader] #version 130 void main(void) { gl_FragColor = vec4(0, 0, 1, 1); } [test] clear color 0.0 1.0 0.0 1.0 clear draw rect -1 -1 2 2 # Bottom left corner is green because triangle 0 was culled relative probe rgba (0.100, 0.100) (0.0, 1.0, 0.0, 1.0) # Top right corner is green because triangle 1 was culled relative probe rgba (0.900, 0.900) (0.0, 1.0, 0.0, 1.0)