Object-to-world space


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!

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.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.