Add PCF25 shadow filtering option in the Compatibility rendering method#92090
Add PCF25 shadow filtering option in the Compatibility rendering method#92090Calinou wants to merge 1 commit into
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