normal matrix for non uniform scaling
问题 Im trying to calculate the normal matrix for my GLSL shaders on OpenGL 2.0. The theory is : a normal matrix is the top left 3x3 matrix of the ModelView, transposed and inverted. It seems to be correct as I have been rendering my scenes correctly, until I imported a model from maya and found non-uniform scales. Loaded models have a weird lighting, while my procedural ones are correct, so I put my money on the normal matrix calculation. How is it computed with non uniform scale? 回答1: You