Jump to content
  • Advertisement


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


Lighting problem...

This topic is 5476 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!