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
Describe the problem or limitation you are having in your project
Directional Shadows Suffer from Pixelization (when insufficient Softness is used, by which is decreased automatically in later splits) and lack detail and stability (because of insufficient Shadow map resolution)
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The Idea is simple, every frame, ever so slightly change the Directional Shadow (by doing things like rolling, which is implemented in MRP) and potentially jittering the Shadow Maps to further improve resolution.
This Rotation reduces pixelization because the rotation changes how the Pixel squares are projected onto a surface and they become circular in appearance (for the same sample of course), while also rolling the Shadow Map changes which points are sampled in the Shadow Map resulting in an increase in the effective Shadow Resolution, further reducing Pixelization.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Proof of Concept Implementation to toy around with below TAASU.zip
Further Implementation Details (Random Rotations or uniform Rotations, rotation step, and so many other factors) still have to be determined for the best results and depend heavily on the TAA implementation (godotengine/godot#61319)
If this enhancement will not be used often, can it be worked around with a few lines of script?
Yes, it can be worked around
Is there a reason why this should be core and not an add-on in the asset library?
This uses TAA to Improve Shadow Rendering Quality for free (in cases where the shadow map is updated every frame anyway, which is often the case)
The text was updated successfully, but these errors were encountered:
Note that doing so will require invalidating the shadow cache every frame. This means that if you previously had opportunities to cache shadow rendering, then you will miss out on those opportunities, therefore increasing the rendering cost significantly.
However, if the shadow map was already invalidated every frame (which is common for directional shadows due to animated characters), then rotating the shadow every frame will probably not affect performance. That said, better shadow caching is something we should look into in the future (i.e. rendering static shadows and dynamic shadows on separate layers). In this case, only the dynamic layer would be re-rendered every frame if you weren't rotating the shadow every frame. This optimization is not possible if you rotate the shadow every frame though.
As a workaround, you can attach this script to any node that extends from Light3D:
Calinou
changed the title
Use TAA to Improve Shadow Quality
Jitter shadow rotation every frame when temporal antialiasing is enabled to improve shadow quality
Jun 7, 2022
Describe the project you are working on
Open World Game
Describe the problem or limitation you are having in your project
Directional Shadows Suffer from Pixelization (when insufficient Softness is used, by which is decreased automatically in later splits) and lack detail and stability (because of insufficient Shadow map resolution)
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The Idea is simple, every frame, ever so slightly change the Directional Shadow (by doing things like rolling, which is implemented in MRP) and potentially jittering the Shadow Maps to further improve resolution.
This Rotation reduces pixelization because the rotation changes how the Pixel squares are projected onto a surface and they become circular in appearance (for the same sample of course), while also rolling the Shadow Map changes which points are sampled in the Shadow Map resulting in an increase in the effective Shadow Resolution, further reducing Pixelization.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Proof of Concept Implementation to toy around with below
TAASU.zip
Further Implementation Details (Random Rotations or uniform Rotations, rotation step, and so many other factors) still have to be determined for the best results and depend heavily on the TAA implementation (godotengine/godot#61319)
If this enhancement will not be used often, can it be worked around with a few lines of script?
Yes, it can be worked around
Is there a reason why this should be core and not an add-on in the asset library?
This uses TAA to Improve Shadow Rendering Quality for free (in cases where the shadow map is updated every frame anyway, which is often the case)
The text was updated successfully, but these errors were encountered: