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

Vulkan: OmniLight3D nodes render improperly after reaching greater than 44 shadow-enabled sources in a scene #64557

Open
the-sink opened this issue Aug 18, 2022 · 2 comments

Comments

@the-sink
Copy link
Contributor

the-sink commented Aug 18, 2022

Godot version

4.0.alpha14

System information

Windows 10, Vulkan Clustered, RTX 2060 (516.94)

Issue description

If there are greater than 44 (?) OmniLights with shadows enabled in a 3D scene, some will begin to attenuate improperly. It also appears to be partly influenced by the range of the light source, and the camera position, with more lights acting strangely as their range is decreased.

Lights will render properly until turning shadows on. Once turned on, the visual bug will appear on some lights and will not disappear even if shadows are then turned off, until the scene has been reloaded. Edit: Appears to be unrelated to this issue in specific, mentioned in #50343.

image

Here's a video as well: https://www.youtube.com/watch?v=vL94p9ZuduA

I'm unsure if this is the result of a built-in engine limit, just thought it was a bit too unusual to be intentional.

Steps to reproduce

  • Create a new project
  • Add some geometry to be able to see the lights (in the attached project a simple plane mesh was used)
  • Begin adding OmniLight3D nodes to the scene (at least 45)
  • Enable shadows on all lights
  • Observe some lights failing to attenuate properly

Minimal reproduction project

lighting-bug.zip

@Chaosus Chaosus added this to the 4.0 milestone Aug 18, 2022
@Calinou Calinou changed the title OmniLight3D nodes render improperly after reaching greater than 44 shadow-enabled sources in a scene Vulkan: OmniLight3D nodes render improperly after reaching greater than 44 shadow-enabled sources in a scene Aug 18, 2022
@Calinou
Copy link
Member

Calinou commented Aug 18, 2022

Can you reproduce this after adjusting the shadow quadrant values in the project settings? Instead of the default 4/4/16/64 split, try something like 16/16/16/64. This will reduce shadow detail but will allow more lights to have shadows enabled, without their resolution decreasing depending on the number of lights.

@the-sink
Copy link
Contributor Author

Yeah, that definitely helps in regards to the number of light sources that render properly. At 16/16/16/256 for example, I can get up to 152 shadow-enabled lights before new ones start to break (ignoring the performance implications of course...)

@clayjohn clayjohn modified the milestones: 4.0, 4.x Jan 14, 2023
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

4 participants