Jump to content
  • Advertisement
Sign in to follow this  
ArKano22

vsm and pcss shadows help

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

I´ve trying to implement VSM shadows but at the same time, i want them to be PCSS shadows so that the penumbra size changes with light/blocker size. However i read somewhere that using PCSS with VSM defeats the purpose of VSM. Is it good to use them together? what about only PCSS with standard shadow maps? Another question i have in mind...why is it not possible to just change the pcss kernel size according to (occluder.z-occludee.z) instead of doing the blocker-search and penumbra estimation? are they there purely for physical accuracy? can i skip these two steps to gain speed?

Share this post


Link to post
Share on other sites
Advertisement
Yeah the whole point of using VSM is to be able to use hardware filtering or pre-filtering to avoid having to manually perform PCF in the shader. You should look at this article though...with summed-area tables you could use variable-sized filtering kernels to implement soft shadows.

Share this post


Link to post
Share on other sites
Ok, so the answer to variable-size filters is SAT.

However i don´t fuly understand why it´s not possible to vary the filter size without using SAT. I will study them by myself but if anyone has a quick answer it will be gratly appreciated.

thanks!

Share this post


Link to post
Share on other sites
The way I understand it, you can very well vary the filtersize without SAT. It's just that the performance will be low for big filter kernels.

Share this post


Link to post
Share on other sites
Quote:
Original post by B_old
The way I understand it, you can very well vary the filtersize without SAT. It's just that the performance will be low for big filter kernels.


Yes, you can, however for pcss it does not work. I´m trying to change the pcf filtersize directly, without searching for blockers, and huge gaps and artifacts appear in the resulting shadow. However if I do the blocker search and plug in the resulting filtersize in the pcf function, it works. The thing i do not understand is why is the blocker search so important and if SAT can replace it.

Share this post


Link to post
Share on other sites
For those who had the same problem as me, i´ve finally understood why you can´t skip the blocker search:

When you´re inside the area that would usually be shadowed, things go fine without blocker search, however think about what happens when you sample outside the shadow: the estimated penumbra size is 0 if you only take 1 blocker (current depth map value). However this is incorrect and because of that, you must average a few blockers so that some are inside the shadowed area and the penumbra calculation returns > 0.

So there´s no way to skip that step.

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!