Shadows maps refinement

Hi All,

You all know shadow maps bigger limit: zooming closer to the geometry you see those ugly staircases!

We are trying to refine the map as you zoom closer to the geometry and getting very promising results?

The problem?

Computing on the fly the proper size of the chunk of the scene inside the frustum to get the texture properly sized.

Do you know if this problems has already been studied from somebody else? Shall we take the depth buffer or geometric approach?

Thanks in advance,


Cascading shadow maps and Parallel-Split Shadow Maps are ways to increase the shadow resolution where needed :

PCF can also help to reduce visible staircase, replaced by more blurry shadows.

I suggest you read this list of techniques :

Yes. What it sounds like you want is Sample Distribution Shadow Maps (SDSM). This is a bolt-on to basic Cascaded/Parallel-Split Shadow Maps to help you position and size your maps. Basically pre-render a depth map of the scene. Then crunch that quickly on the GPU (with OpenCL/CUDA kernel or via GLSL shaders) to determine where you need shadow map coverage. Briefly mentioned a few bits of my experience with this here.

Yeah, the tricky thing with large zooms (narrow frustums) is that it makes the frustum splits very long and very thin, which doesn’t work well for fitting shadow maps to. You need a quick way to wack off all the “dead space” that doesn’t have any shadow receivers in it so you don’t waste shadow map res in those areas and focus your res precisely on the area(s) you need.

As a first-cut, you can use cull results to provide a rough bounds to your scene, but in this day in age (with spatially large batches and near-free triangle culling on the GPU), the “rough” is the killer. In my experience, this ends up being way too course to maximize use of your shadow resolution. You need finer bounds on your rendered fragments, and that’s what SDSM gives you.

Thanks guys, these articles will for sure help us computing this volume.

Thanks so much again!