I'm doing omni directional shadow mapping and one thing I cannot grasp is during the lighting stage, how does one get the vector to use in sampling the cubemap?
In the shadow pass I just use the depth values, so I need to be in the same space now. But how do I know which of the six view matrices to use (as it is one for each face) to convert the world space position into the NDC space?
For example, using this as a reference, looking at the fragment shader there is a "light_view_matrix" - but what is it? Light view matrix... of what face? I generated one for each face during shadow pass.