You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #4635 (technique from the same presentation).
Describe the project you are working on
The Godot editor 🙂
Describe the problem or limitation you are having in your project
Shadow map rendering was already significantly improved in Godot 4.0. Most shadow acne situations can now be avoided without introducing much visible peter-panning. However, we can still go further to improve quality without increasing the performance demands too much.
Additionally, Godot 4 offers percentage-closer soft shadows (PCSS) when full contact hardening of shadows is desired. This can look great, but it's also expensive. Its use should be limited to a few lights per scene at most, and it should be disabled when targeting lower-end GPUs.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Dilated percentage closer filtering (DPCF) is a cheaper implementation of PCSS. It's mainly intended to reduce shadow acne in situations where it can still be noticed, even after the changes made to shadow rendering in Godot 4. DPCF is not intended to provide full contact hardening like PCSS, although it does provide some form of contact hardening which may be good enough in some cases.
The principle goes as follows:
If the depth difference between the caster and the receiving surface is low, decrease the blur radius compared to what it would be otherwise.
If the depth difference between the caster and receiving surface is high, keep the blur as-is.
Shadow acne is naturally reduced, as the caster and receiving surface will be very close to each other in this situation. Lower shadow blur will make acne less visible, so it works very well in this situation.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
This can likely be implemented in both Vulkan Clustered and Mobile backends, and maybe even the OpenGL backend.
Depending on the performance cost of DPCF, we may want to add a project setting to toggle this (probably enabled by default on desktop, and disabled by default on mobile).
I've been looking for some options to make shadows more grounded, such as contact shadows. But this seems like a relatively straightforward enhancement to the current shadowing system that would greatly improve fidelity.
I mocked up this image by combining 2 different blur levels. Is this a good approximation of what the effect would look like?
@VantaGhost Yes, but in the case of Blur = 1, you can probably get better bias by manually decreasing shadow bias. The automatic bias adjustment according to shadow blur can sometimes increaes bias too much (it's conservative and aims to avoid acne as much as possible).
Related to #4635 (technique from the same presentation).
Describe the project you are working on
The Godot editor 🙂
Describe the problem or limitation you are having in your project
Shadow map rendering was already significantly improved in Godot 4.0. Most shadow acne situations can now be avoided without introducing much visible peter-panning. However, we can still go further to improve quality without increasing the performance demands too much.
Additionally, Godot 4 offers percentage-closer soft shadows (PCSS) when full contact hardening of shadows is desired. This can look great, but it's also expensive. Its use should be limited to a few lights per scene at most, and it should be disabled when targeting lower-end GPUs.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Dilated percentage closer filtering (DPCF) is a cheaper implementation of PCSS. It's mainly intended to reduce shadow acne in situations where it can still be noticed, even after the changes made to shadow rendering in Godot 4. DPCF is not intended to provide full contact hardening like PCSS, although it does provide some form of contact hardening which may be good enough in some cases.
The principle goes as follows:
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
This can likely be implemented in both Vulkan Clustered and Mobile backends, and maybe even the OpenGL backend.
Depending on the performance cost of DPCF, we may want to add a project setting to toggle this (probably enabled by default on desktop, and disabled by default on mobile).
Slides 61 to 74 of https://research.activision.com/publications/2021/10/shadows-of-cold-war--a-scalable-approach-to-shadowing mention a DPCF implementation. Including screenshots of the most important two slides for reference, in case that link goes down:
If this enhancement will not be used often, can it be worked around with a few lines of script?
No.
Is there a reason why this should be core and not an add-on in the asset library?
Shadow map rendering is core engine functionality. It can't be overridden by an add-on.
Keywords for easier searching: shadowmap, shadowmapping
The text was updated successfully, but these errors were encountered: