title: Point light shadow mapping and lighting shader
body: <p>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?</p>
  
  <p>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?</p>
  
  <p>For example, using <a href="http://www.opengl.org/discussion_boards/showthread.php/174093-GLSL-cube-shadows-projecting?p=1219162&amp;viewfull=1#post1219162" rel="nofollow" title="this">this</a> 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.</p>