Cascaded Shadow Maps

Started by
2 comments, last by Aqua Costa 13 years, 1 month ago
Im going to implement cascaded shadows maps in my engine. But I have some questions that I would like to have answered first.

1- How do I store each cascade? Do I use multiple render targets? Or store all cascades in a shadow atlas?

2- I have read that there are some problems when the light and camera directions are parallel? Can someone explain what are those problems and with they occur?

3- Should I fit the view-frustum with the scene or the cascades?

Thanks in advance
Advertisement

Im going to implement cascaded shadows maps in my engine. But I have some questions that I would like to have answered first.

1- How do I store each cascade? Do I use multiple render targets? Or store all cascades in a shadow atlas?

2- I have read that there are some problems when the light and camera directions are parallel? Can someone explain what are those problems and with they occur?

3- Should I fit the view-frustum with the scene or the cascades?

Thanks in advance


I would suggest using parallel split shadow mapping, which is the same concept of cascading, except the results are better, and it is easier to manage.

The answer to question 1 is that there is no benefit or downside to any of those. I personally store mine in a texture array just because I want to...

2) not sure if there are problems . . I dont have any in my parallel split one.

3) dont understand the question.. . . .
Wisdom is knowing when to shut up, so try it.
--Game Development http://nolimitsdesigns.com: Reliable UDP library, Threading library, Math Library, UI Library. Take a look, its all free.
1. In my experience a texture atlas is still the fastest way, at least for rendering the shadow map. DX10/DX11 Texture arrays are awesome for convience, but using SV_RenderTargetArrayIndex + a geometry shader causes some serious overhead. Switching render targets for each cascade is also bad, because it causes a lot of CPU overhead and GPU stalling/flushing.

2. It's somewhat of a degenerate case for CSM algorithms, because you'll end up with most visible geometry being in the same cascade. But it won't break anything, it just won't look as nice for that direction.

3. I'm not sure what you mean bu this. Could you elaborate?
Thanks for you answers...

And I have some new questions:

4- I have to use D3DXMatrixOrthoOffCenterLH to create each subfrusta right? I calculate the world position of the eight corners of each subdvision of my eye view frustum and transform them to light view space. How do I choose the min and max values to build each subfustra?

5- How do I choose the z near and far values of each subfustra?

This topic is closed to new replies.

Advertisement