I’m trying to use the user clipping planes with a vertex&fragment GLSL program, but it doesn’t work.
I have read that you only have to set the gl_ClipVertex = gl_ModelViewMatrix * gl_Vertex;
and that’s all, of course, you have to set the clipping planes with glClipPlane (…) and activate it glEnable(GL_CLIP…).
Thanks in advance
Hello! I have the same problem as u…r u testing in ATI or NVIDIA boards? In ATI it works fine, even not specifying the clip vertex…but in NVIDIA…im waiting for a miracle to get it working…if u find any solution please email me
The current public NVIDIA drivers do not support the gl_ClipVertex output, this will work in Release 75 (75.80 and later) drivers.
As a workaround, you can write to the gl_ClipCoord output:
vec4 clipVertex = gl_ModelViewMatrix * gl_Vertex;
for (int i = 0; i < 6; i++)
gl_ClipCoord[i] = dot(clipVertex, gl_ClipPlane[i]);
which is supported in current drivers.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.