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?
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.