Cubemap depth as point light shadow depth
Now the cube depth map has been generated, we can use this texture as shadow depth map.
To calculate pixel depth in deferred shader, the longest axis of pixel to light position is used as linear depth. But cubemap depth is logarithmic, and we need both to be the same format for comparison. In my shader, I converted depth from cubemap to linear one.
Now, apply this depth comparison to attenuation and everything’s done.












