# gl_ClipDistance vs gl_CullDistance

Why are there very similar yet distinct arrays: gl_ClipDistance[] vs gl_CullDistance[]?

What would be some use cases where the need for two distinct entities become apparent?

• I ran this simple experiment on the triangle example from Sascha Willems' Vulkan repo. In the vertex shader if(0 == gl_VertexIndex) gl_CullDistance[0]=-1.0f; and expected the whole triangle to disappear but it didn't. I had to set the gl_CullDistance[0] to -1.0f for all three vertices to make the triangle disappear. On the other hand, gl_ClipDistance[] worked as expected. – Vectorizer May 30 at 15:18