Jump to content
  • Advertisement
Sign in to follow this  
yoshi_lol

Volumetric Lighting with SDSMs

This topic is 1064 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

Looking for ideas on how to combine Sample Distribution Shadow Maps with ray-marching based volumetric lighting.

I can't just sample the SDSM cascades since they only contain valid information for the fragments being shaded, not arbitrary points in 3D-space like regular CSMs.

 

I could only come up with two "fixes" that sound kinda terrible: 1) render another standard shadow map covering the entire frustum or 2) widen the bounding boxes of the cascades to include the entire 3D space, essentially trading shadow map quality for arbitrary sample locations.

 

Tried 1) already and it simply doesn't work well when the near/far distance goes up. I haven't tried limiting the shadow map to the max ray distance yet though.

 

Haven't tried 2) yet. Trading shadow map quality sounds pretty bad though.

Edited by yoshi_t

Share this post


Link to post
Share on other sites
Advertisement

You could try "simple" SDSM where you're only matching to near and far Z, you get faster performance than "full" SDSM anyway, and it should cover the "3D space" well enough and not leave any gaps, since you're not sampling any volumetric space beyond the far Z clamp anyway.

Edited by Frenetic Pony

Share this post


Link to post
Share on other sites

Do you mean stopping after the (log-)partitioning and using those partition bounds to render the shadow maps? If so, that's basically what I meant in 2), maybe I phrased that poorly.

Share this post


Link to post
Share on other sites

Do you mean stopping after the (log-)partitioning and using those partition bounds to render the shadow maps? If so, that's basically what I meant in 2), maybe I phrased that poorly.

 

Err, yes. Sorry, read that wrong. But you can trade that off for just skipping a lot of the overhead from full SDSM, so you get something back in the process. Otherwise, as you said, I don't see a way to do so with SDSM specifically as you're going to just end up with gaps you'd want to sample otherwise.

Share this post


Link to post
Share on other sites

I have pondered this issue few times myself. Conclusion have always been that taking raymarching samples degenerates SDSM to your 2. choise

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!