Original Post
Hi, I'm trying to implement a water system. For the reflection I render the whole (clipped) Scene into a Texture. In the second rendering step I use this texture and project it onto a plane to get the reflections. It does actually work good, but with some errors you see in the screenshot. Both screenshots show the same scene from different viewpoints and camera angles. You see that the reflections looks good in the center (green arrow) but left and right of it bad (red arrow). http://img236.imageshack.us/my.php?image=screenpos1he8.png http://img236.imageshack.us/my.php?image=screenpos2sq8.png Here is the relevant Code (which draws the texture into the scene), I dont know what went wrong.. glMatrixMode(GL_TEXTURE); glLoadIdentity(); glTranslatef(0.5f, 0.5f, 0.0f); glScalef(0.5f, 0.5f, 1.0f); glMultMatrixd( projmatrix ); glMultMatrixd( mvmatrix ); glMatrixMode(GL_MODELVIEW); glBindTexture(GL_TEXTURE_2D, mirrorTex); glBegin(GL_TRIANGLE_STRIP); glTexCoord3f(-300.0f,20.0f,-300.0f); glVertex3f(-300.0f,20.0f,-300.0f); glTexCoord3f(-300.0f,20.0f,300.0f); glVertex3f(-300.0f,20.0f,300.0f); glTexCoord3f(300.0f,20.0f,-300.0f); glVertex3f(300.0f,20.0f,-300.0f); glTexCoord3f(300.0f,20.0f,300.0f); glVertex3f(300.0f,20.0f,300.0f); glEnd(); glMatrixMode(GL_TEXTURE); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); edit: In my opinion the texture is not scaled correctly!? But why? [Edited by - rotalever on September 13, 2006 1:09:30 PM]