Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I just implemented an initial version of CSMs based on the MSDN articles Common Techniques to Improve Shadow Depth Maps and Cascaded Shadow Maps.

I fit the shadow projection to the view frustum, and do not clip against the scene bounds, because in Common Techniques to Improve Shadow Depth Maps it is stated:

It is also possible to clip the frustum to the scene AABB to get a tighter bound. This is not advised in all cases because this can change the size of the light camera's projection from frame to frame. Many techniques, such as those described in the section Moving the Light Texel-Sized Increments, give better results when the size of the light's projection remains constant in every frame.

However, in the paper from the Nvidia SDK the frustum is further clipped against the scene bounds to achieve a maximum used area for the shadow map.

This confuses me. Did the guys from MSDN miss something, is the Nvidia paper simply older or am I not understanding the Nvidia approach correctly?

Edit: I was right in not understanding the Nvidia approach, basically not at all. I confused the crop matrix with a clipping against scene bounds.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The MSDN statement is correct; it's usually not useful to clip to the scene bounds.

First of all, in a "real" use case you probably have a large game world where the scene is much bigger than the view frustum, so clipping to the scene bounds won't even do anything. In a small scene, such as in a test world, you could get better shadow resolution by clipping to the scene bounds, but it wouldn't be representative of the shadow resolution you'd get in a larger world.

And, as they mention, depending on how the clipping is done, the shadow resolution might change as the camera rotates around. (It would also change if the scene is animated in such a way that its bounds change over time.)

I didn't see anything in the NVIDIA paper about clipping to the scene bounds.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.