Anisotropic Filtered Shadows #7178
Replies: 4 comments 3 replies
-
Shadows don't have mipmaps generated in the first place – it would be too expensive to do so. You need to avoid aliasing by ensuring their texel density (relative to the screen resolution) isn't too high. This is actually where making shadows lower-resolution or blurrier improves quality 🙂 In general, if you have the GPU horsepower to render shadows that are so high-resolution they become aliased, you probably have the GPU horsepower to render the entire viewport at a higher resolution. |
Beta Was this translation helpful? Give feedback.
-
after toying around with it some more, I've figured out that dynamically adjusting blur based on angle from the camera will always produce an effects like the above, so I went to resolving some other issues for my project aand... I've accidentally found the culprit of excessive Shadow Aliasing - godotengine/godot#48776 once I reverted this, only a little bit of shadow aliasing remains present (though depends on how you set up your splits, too tightly packed splits alias a bit more), as shadows are naturally much blurrier in the distance, where aliasing gets really strong with insufficient blur.. |
Beta Was this translation helpful? Give feedback.
-
Questions for anyone with GLSL experience - How do you set a sampler to use Anisotropic Filtering? |
Beta Was this translation helpful? Give feedback.
-
I've gotten an Idea what needs to be done to fix the issue above, and the NdotV method of increasing the blur is indeed the way to go, just have to do a non-uniform blur that only applies to the y axis of the pixels.. How to do that I'm not entirely sure yet, but I'm experimenting. The hurdles to overcome are:
|
Beta Was this translation helpful? Give feedback.
-
I've been looking at ways to reduce Shadow Aliasing at oblique angles, and currently there are only 2 approaches - Supersampling and TAA.
TAA suffers from regular TAA issues + sudden pixelization when sudden changes in movement occur (Godot specific issue that'll likely be gone with the planned FSR2 TAA)
SSAA is very expensive
Now while playing around with faked Decal Shadows I've compared linear anisotropic and simple linear results, and simple linear results in identical issues as normal shadows, while anisotropic results are great, which made me ask the question:
Could Shadows implement some form of in-shader (quasi-)Anisotropic Filtering for shadows to improve Shadow stability at oblique angles?
The Advantages are obvious, it'd remove the need for using TAA/SSAA to resolve the issue, allowing just MSAA and/or FXAA to be used with great results, and in cases where the only reason for TAA is to fix this issue it'd likely massively improve performance while eliminating ghosting
Beta Was this translation helpful? Give feedback.
All reactions