Google-apps
Hoofdmenu

Post a Comment On: C0DE517E

"Stable Cascaded Shadow Maps - Ideas"

8 Comments -

1 – 8 of 8
Anonymous mg said...

Just a quick comment, the following is an invalid optimization:

"Avoid rendering objects in far cascades if they were rendered completely in the previous ones."

In the situation where you look in the direction of the lightvec, objects rendered into near cascades will cast shadows into the far cascades, and are thus needed for all cascades.

March 29, 2011 at 3:17 AM

Blogger DEADC0DE said...

mg: no it's ok if you render the shadows using the "best" cascade and not the split planes, as suggested.

March 29, 2011 at 10:22 AM

Blogger Sebastian said...

That is true assuming earlier cascades' far plane extend past the entire frustum, not just their "slice".

If you do put the far plane at the end of the slice then you could indeed have objects entirely in slice 0 cast shadows into slice 1.

April 4, 2011 at 10:39 AM

Comment deleted

This comment has been removed by the author.

May 14, 2011 at 12:54 PM

Blogger Dark Helmet said...

If I understand the specific problem being discussed here, the "use the highest map" heuristic makes the implicit assumption that you are (in light space) culling shadows to the full bounds of entire split's "shadow map", not to the bounds of the "eye-frustum slice" (which is a subset of the map).

That is, it assumes that every single pixel of the split shadow map is defined and valid.

What that implies is that sometimes you cull in and draw a boatload of extra junk into your split's shadow map (inside the map, but outside the eye-frustum split, projected into light space) that you usually don't ever need, which costs you perf.

The alternative is that you tightly cull to the bounds of your eye-frustum split projected into light space, which avoids rendering all this extra junk. And you don't use this "use the highest map" optimization, but rather select maps purely based on frustum split distances.

Of course in either case, you back off your light-space near plane forward toward the light than the closest eye-frustum split vertex (projected into light space) so that you can grab out-of-frustum shadow casters that cast into the view frustum.

May 14, 2011 at 1:01 PM

Blogger DEADC0DE said...

Dark Helmet - yes and no. You can still cull each cascade using the extruded frustum planes of the split, you just exclude the far plane. Also if you avoid rendering objects that were fully included in a given cascade in lower-res ones, overall you can get some savings. But it's true that it's a tricky thing to balance, I don't think I know the "perfect" solution or can prove a given strategy is always better.

May 14, 2011 at 5:10 PM

Blogger Dark Helmet said...

Ah!, thanks. I think I see now. Ignore the eye-space split far plane, and clip by the bounds of the split's shadow map instead.

So in the worst case (light rays orthogonal to view direction), you get a little extra distance coverage in the higher res splits.

And in the best case (light rays parallel to view direction), you end up with everything toward the center of the eye view being in the high-res map regardless of distance, but as you get out toward the edges (in XY) of the same eye view, you step down progressively to the low-res maps.

May 14, 2011 at 6:39 PM

Anonymous Florent Tournade said...

Look at SDSM Sample Distribution Shadow maps.
What it does basically, is analyzing the content of the ZBuffer with Cuda/OpenCL/DirectCompute) to find optimal (tight) cascade bounds.

It improves resolution greatly, see for yourself...

June 15, 2011 at 7:43 AM

You can use some HTML tags, such as <b>, <i>, <a>

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot