Jump to content
  • Advertisement


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


Small objects brighter

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

When I render two identical objects at different sizes, the smaller one is a lot brighter. The only way I can get them to look the same is to change the light settings. (If I draw the object at half size, and scale the light intensity by half, it looks right.) Is there any reason for this, or am I missing something?

Share this post

Link to post
Share on other sites
Make sure you''re normalizing your surface normals. To do that, divide your axial components by the vector''s magnitude.

float reciprocalDistance = 1.0f / sqrtf(square(vector.x)+square(vector.y)+square(vector.z))

vector.x *= reciprocalDistance;
vector.y *= reciprocalDistance;
vector.z *= reciprocalDistance;

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!