Lighting and scaling meshes

Started by
-1 comments, last by Coluna 17 years, 3 months ago
Hello there; Im using GLSL to do ppl in my engine. I first transform the light position to object space , using the object affine matrix, and do the math. But the problem is when we have scaling on the object matrix. In my affine method, i invert the scaling of each axis, and its ok. But the problem is that i have to change the light radius too, like newRad = radius/scale. But the problem is that i do not take in account the 3 radius of the light (x, y , z), and others problems may appear too. Had anybody solved this with a simple aproach? Thanks.

This topic is closed to new replies.

Advertisement