gl_ClipDistance not working with nvidia cards

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.

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

Yep, no problems in 190.57.

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

Don’t forget to glEnable your planes…

Thank you. The new drivers have fixed this bug!