-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
Crossed omni and spot light shadows cause artifacts. #76260
Comments
I'm not sure I understand what the bug is here. I see no difference in shadow quality when enabling/disabling either the OmniLight or the SpotLight. In the image it appears that you are pointing out the aliasing artifacts on the edge of the omnilight shadow. Those artifacts are present both when the SpotLight is enabled and disabled. To get rid of them you need to set the Positional shadow quality setting from Low (the default) to High. Once you set Quality to high the edge looks very smooth. To be clear, increasing resolution also helps, but it isn't a proper solution for this type of problem |
This is expected, as shadow maps have a limited resolution. You can also increase Shadow Blur on the Light3D's properties if you want to make the shadow blurrier (which will hide sampling artifacts), but don't make it too high or dithering artifacts will become noticeable. |
This is shadow acne, which is caused by bias being too low. Increase Shadow Bias and/or Normal Bias in the inspector. Don't set it too high or peter-panning will occur (shadows disconnecting from objects). |
Yea it helps,. but what would be possible to do with dithering patterm that appears in the floor that look like circles in the below screenshot aside from turning off the filter in soft shadows ? i tried increasing fog there but it only goes back with high amount which makes more artifacts appear. |
The shadow dithering pattern is expected; it improves perceptual rendering quality. This pattern becomes less noticeable at higher viewport resolutions, or when you start adding textures to your level. If you disabled dithering, sampling artifacts would become much more noticeable (#53961). Dithering is one of the reasons why shadows look so much better in 4.x than 3.x 🙂 Closing, as this isn't a bug and this will be eventually improved when TAA is enabled as per godotengine/godot-proposals#4179. |
Thank you also i found some document about using temporal reprojection, which could help giving shadows a better look if you want to see it and evaluate it aside from fsr 2.2 https://www.google.com/url?sa=t&source=web&rct=j&url=https://diglib.eg.org/bitstream/handle/10.2312/EGWR.EGSR07.045-050/045-050.pdf%3Fsequence%3D1%26isAllowed%3Dy&ved=2ahUKEwia4dCNgMP-AhXzUKQEHThhA-8QFnoECAcQAQ&usg=AOvVaw17_-JjdfO6WHPt7XmBhCjU |
Godot version
Godot 4.0.2 stable
System information
Windows 11 amd radeon Tm graphics , 8gb ram, vulkan clustered
Issue description
It seems that when the shadows from a spotlight and a omnilight are crossed between each other it causes artifacts to appear in the edge of the shadows. This can be more noticeable with there are no directional light as their shadows hide the artifact. Btw to see it better i made it be black so it can be more distingueable.
Also kind of workaround is increasing their resolution, although it has a big impact on perfomance.
Steps to reproduce
1 Open the project zip and extract
2 Add an omni and spot light with shadows enabled
3 make it direction crossed between each other and it has some object
Minimal reproduction project
test_shadow.zip
The text was updated successfully, but these errors were encountered: