-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PCF25 shadow filtering option in the Compatibility rendering method #92090
base: master
Are you sure you want to change the base?
Add PCF25 shadow filtering option in the Compatibility rendering method #92090
Conversation
This is a high-quality shadow filter which results in smooth, stable shadows even for dynamic objects. Thanks to early bailing, PCF25 is faster than the old PCF13 implementation while looking better. It's also not that much slower compared to the new PCF13 implementation. PCF25 is used when the soft shadow quality setting is set to Ultra.
A question, regarding early bail, doesn't it make sense to sample in the x pattern and not + pattern? |
Or have early bail as a separate option (e.g. off, medium, high)? Maybe if we rotated e.g. a disc, the chance of having offensive artifacts from early bail might be reduced. |
Maybe the pattern change from + to x would help, which i asked about earlier.. |
Could you upload a minimal reproduction project? It might be possible to tweak the early bailing pattern to reduce artifacts. I wouldn't remove early bailing entirely though (or provide an option for what is essentially an optimization), as the performance gain is very significant for something like PCF25. The Compatbility rendering method targets low-end hardware after all, so PCF25 needs to be somewhat usable on mobile and recent integrated graphics. |
I don't have the project where I took this, however the basic creation steps are simple, just get something that has high frequency gaps in shadows, like say an Alpha Hash transparency casting shadows, that just wrecks things worse than the above example. I'm also afraid that this is just a fundamental flaw of Early Bail, and anything that creates small, pixel or so wide gaps between shadows causes the artifact, and just does so much more easily with PCF25 which is likely why it wasn't noticed and reported before for PCF13, due to a lack of any more complex shadowing scenarios being present for them to show up. |
This is a high-quality shadow filter which results in smooth, stable shadows even for dynamic objects.
Thanks to early bailing, PCF25 is faster than the old PCF13 implementation while looking better. It's also not that much slower compared to the new PCF13 implementation.
PCF25 is used when the soft shadow quality setting is set to Ultra.
Preview