Archived

This topic is now archived and is closed to further replies.

Orb

Lighting problem...

Recommended Posts

This happens to me all the time, but I always disregarded it. I''m trying to render some animated water, and it''s working, but I''m having problems with the light that I set up. When ever I rotate the camera down, the light fades, and the water becomes darker. When I rotate the camera up, the water gets lighter. It''s almost as if the light is view dependant, but I never set that.

Share this post


Link to post
Share on other sites
I had the same problem before when i started to use gluLookAt.

It happened when i used:
(glLightfv(GL_LIGHT0, GL_POSITION, lightPosition) or your equivelent) before calling gluLookAt.

I fixed it by calling it after gluLookAt.

Hope that helps.

Share this post


Link to post
Share on other sites