-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Vulkan: SpotLight3D angles above 90 degrees cause clustering artifacts (even with shadows disabled) #48054
Comments
They are intended to be supported, but only when shadows are disabled. If shadows are enabled for an ultrawide spotlight, a node configuration warning is emitted. |
I can confirm this on commit 52e3f98 (Linux + NVIDIA). The angle of the clustering artifacts seems to be 45 degrees (good)135 degrees (bad) |
We don't seem to have access to the spot angle in the cluster data, so we can't treat ultrawide SpotLights as OmniLights for the purpose of clustering. The only reference to SpotLights in the cluster builder is here: godot/servers/rendering/renderer_rd/cluster_builder_rd.cpp Lines 449 to 452 in a6a2e0f
|
Godot version:
4.0.dev f817e7f
OS/device including version:
Windows 10.0.19041.928
Nvidia RTX 2080 Ti
Driver version 466.22
Issue description:
SpotLight angles seem doubled from what makes intuitive sense to me. For example, an angle of 120 degrees covers roughly 240 degrees of the sphere. 179 degrees covers effectively the whole sphere, same as an omni light.
However, when the Spotlight angle exceeds a Hemisphere (90 degrees in Godot), the spotlight continues to expand, but the clusters collapse to (180-angle) degrees, causing the square clustering artifacts.
My opinion is spotlights which are greater than a hemisphere are kind of a strange concept, but if they are intended to be supported, perhaps this could be worked around by having the clustering algorithm treat them like omni lights.
Steps to reproduce:
Minimal reproduction project:
SpotLightClusterTest.zip
The text was updated successfully, but these errors were encountered: