Skip to content
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

NaN diffuse lighting artifacts on lights with very high Attenuation values #68464

Open
Tracked by #66458
Calinou opened this issue Nov 9, 2022 · 0 comments
Open
Tracked by #66458

Comments

@Calinou
Copy link
Member

Calinou commented Nov 9, 2022

Related to #65497.

Godot version

4.0.beta (282e50a)

System information

Fedora 36, AMD Radeon RX 6900 XT, KDE + KWin

Issue description

Lights with high Attenuation values result in black light appearing. This is most likely due to a NaN computation result. The black part is visible even if the light is located inside the solid surface. Here, one of the OmniLight3Ds is inside the cube, and the other one is outside on the left:

2022-11-09_23 30 16

If using the Lambert Wrap diffuse mode, the light becomes visible while the light is located inside the solid surface (this is expected):

2022-11-09_23 31 02

Changing the specular mode to Disabled does not hide this NaN issue, so the issue is in the diffuse light computation.

The issue occurs with both Vulkan Clustered and Mobile backends. However, with the Mobile backend, the issue appears differently:

image

With the OpenGL backend, a similar issue occurs, but the Attenuation value on the lights must be toned down from 70 back to 40 in the MRP for it to be visible:

image

Steps to reproduce

  • Add a OmniLight3D node with a low range and position it near a solid surface.
  • Increase the OmniLight's attenuation to a value of 40 or more.

Minimal reproduction project

test_light_attenuation.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants