If I want to morph an object by scaling, how can I calculate the normal correctly according to the different x,y,z scaling factor?
Where are you getting the normals in the first place? You’re going to have to recalculate them just as if you’d never had them.
[This message has been edited by ioquan (edited 07-08-2002).]
It’s better to enable normalization. You are talking about applying glScale to the modelview right?
If the scaling is non-uniform, i.e. the scale factors for x,y and z differ, I don’t think you can do anything but normalize. With uniform scaling however there is a cheaper way to ensure unit length normals. See the rescale normal part of GL 1.3 or the rescale normals extension, I think they cover the math.
GL_NORMALIZE is really fast on GF3’s.