View Full Version : object-to-world space

01-14-2007, 07:23 AM

I need the normals from my object in world space. But as far as I understand it, there isn't any matrix which performs that task in GLSL, is it? I've read about separating the gl_ModelView Matrix to perform this task.
But I'm not sure on how to do it. Any ideas on how to do this - converting an object spaced normal in GLSL to world space?

thank you!

01-15-2007, 05:53 AM
When you construct your modelview matrix, you have to know which transformations belong to the object-to-world part and which belong to the world-to-view part. So instead of combining them in one matrix, you keep two.