View Full Version : Cascaded Light-Space Variance Shadow Map Distance Problem

12-09-2012, 10:25 AM

I attempted to use variance shadow mapping with cascaded shadow maps that are aligned with the viewing frustum, but I am not certain how to store the depth in the shadow maps for it.
Since the light is directional, there is no position that I can get the distance from like I can with a spot light (view space fragment coordinate vector length).
So, if I just use the light space depth, changing the rotation of the camera changes the light penumbras (since the cascades move with it).

The problem seems to be similar to the one in this (unanswered) post: http://gamedev.stackexchange.com/questions/14646/rotating-camera-changes-directional-light-depth-map-and-changes-pcss-penumbras
It uses percentage closer filtering instead of VSM.

How can I resolve this issue?

Thank you for any help you can offer.

12-15-2012, 05:32 PM

12-16-2012, 12:11 AM
Have you looked at this