Original Post
I'm trying to implement water with reflections. When rendering the reflected geometry, I know I'm supposed to use clip planes to clip all geometry that is, in unreflected form, below the water plane (i.e. all geometry that is above the water plane in reflected form) in order to avoid artifacts. I think I've written correct code for this, but I still get artifacts that suggest I haven't:
Here's the code. The water is located at height 0: I'm using a GeForce 7600 GS. [Edited by - all_names_taken on June 11, 2007 7:34:26 AM]
Here's the code. The water is located at height 0:
double plane[] = {0.0f, -1.0f, 0.0f, 0.0f};
glClipPlane(GL_CLIP_PLANE0, plane);
glEnable(GL_CLIP_PLANE0);
//draw reflected stuff here...
glDisable(GL_CLIP_PLANE0);