Jump to content
  • Advertisement

Archived

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

serez

Problem with directional lighting when I scale

This topic is 5466 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

Hi All, I have built a renderer, with only directional lighting (i.e., 0.0f in the W coordinate of the position of two directinal lights). When I render a model (I have tried some) and scale it down by 0.1f in all coordinates it becomes more lighted or bright. I have tried many other scale sizes, but in 0.1f there is a brightness popping. Why is this happenning and How can it be solved?

Share this post


Link to post
Share on other sites
Advertisement
when you scale teh matrix, all the normals will be scaled as well, and that affects lighting.

glEnable(GL_NORMALIZE);

should do the trick.

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!