I have a 1920x1200 shadowmap which just has the depth values of my scene drawn from the point of view of the light.
I also have a 1920x1200 gbuffer that draws my scene to a fullscreen quad.
How can I sample the shadowmap from the gbuffer lighting phase? What kind of maths needs to be performed? I have access to view space normal and view space position.