Sign in to follow this  

Cascaded Shadow Maps

This topic is 2489 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
[quote name='TiagoCosta' timestamp='1298327296' post='4777255']
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
[/quote]

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.. . . .

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

This topic is 2489 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this