I’m trying to update an old demo of mine, and I have switched alot of my rendering over to GLSL. My problem is that in order to get clipping planes to work, I have to use gl_ClipPlane in my shader. Now I can get this to work. But if I try to render when I am not using a clip plane, my shader doesn’t draw correctly.
I am trying to do reflections, so I have to render my scene, once upside down, and once normally, but I don’t want to clip the normal version, and I need the shader to make the reflection look like the original (lighting, etc).
Would the best way to do this, be putting an ‘if’ statement in my vertex shader and send a uniform variable stating whether clipping is enabled or not?
Or could something else be going wrong (I’ve recently switched to Ubuntu from Windows, maybe a driver issue?)?