Hey Guys,
I'm currently attempting to implement omnidirectional shadow maps, and I've gotten to the stage where I am ready to create the necessary shaders.

However, one problem I have is how do I calculate which face I have to sample? I'm rather new to cube maps, so all I know is that I need to supply it with a vec4.

I attempted to re-use the method that I'm using to calculate the direction of a ray leaving the player camera (normalize the lightPosition - vertexPosition), but this doesn't seem to work.

Finally, as a secondary question, I've also read about samplerCubeShadow on the OpenGL wiki, does this provide any benefits over the default cube map sampler?

Thanks for the help!