Advertisement

Scaling, Lighting and Normals

Started by December 04, 2001 08:10 AM
1 comment, last by wolfman8k 23 years, 2 months ago
Whenever I call glScalef() the normals also get scaled and therefore don''t have a length of 1. This changes the lighting. When I scale an object to make it big then it gets dark, and when I scale an object to make it small it gets bright. How can I have it where glScalef() won''t scale the normals? Thanks.
If you do want your normals to have a length of 1 you could enable GL_NORMALIZE. But it could half your framerate if you do.

Edited by - Wouter on December 4, 2001 9:18:22 AM
Advertisement
You may use the EXT_rescale_normal extension. It only divide the normal by the scaling factor, which is faster than normalizing it. Of course, this only works if your normals were normalized before the scale.

This topic is closed to new replies.

Advertisement