PDA

View Full Version : gl_ClipDistance not working with nvidia cards



makaroni
09-28-2009, 11:03 AM
Hello,

we are currently in the process of updating our 3D engine to support OpenGL 3.1 and 3.2. So far everything works just fine, however we can't get gl_ClipDistance to work in the vertex shader on NVIDIA drivers. We always receive the following error when compiling the shader:

error: unknown builtin varying parameter (named gl_ClipDistance[0]) encountered

The same code works just fine on ATI card's which is rather surprising considering the fact that NVIDIA has done such a good job on OpenGL in the past.

Could someone provide me with a sample shader or explain to me why we get this error on NVIDIA cards? We already have installed the latest driver 190.62.

Ilian Dinev
09-28-2009, 06:24 PM
The official 190.62 drivers have that bug.
It has been fixed in the beta 190.57 GL3.2 driver (some numbering confusion) . http://developer.nvidia.com/object/opengl_3_driver.html

Brolingstanz
09-28-2009, 09:43 PM
Yep, no problems in 190.57.

gl_ClipDistance[0] = dot(WorldPos, vec4(0,1,0));

Don't forget to glEnable your planes...

makaroni
10-06-2009, 11:25 AM
Thank you. The new drivers have fixed this bug!