GL_SPHERE_MAP question


Sorry if this has been discussed already, I didn’t find any useful posts…

So my problem is, that I have a water surface (sinus surface), and I use glTexGen with GL_SPHERE_MAP to put a fake reflection effect on it. I’ve noticed that the texture is “moving” on the surface when you move the camera. Is there a way to eliminate this using simple sphere mapping (not cube mapping)?

I am not sure what you are reflecting. If you are just reflecting the sky (infinitely far away) then you just need to rotate the sphere map according to view direction. If you are trying to do local reflections (with a sphere map?!) then maybe the above link helps. There is sample code at

[This message has been edited by hypotenuse (edited 04-30-2002).]

I’m just reflecting the sky, so I think the sphere map rotation will be fine. Thanks!