-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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: Random meshes vanish in large scenes with lights that have a projector texture #68274
Comments
I can confirm this on 4.0.beta 282e50a (Fedora 36, Radeon RX 6900 XT with RADV). This only occurs on Vulkan Clustered, not Vulkan Mobile. Increasing Max Clustered Elements to 2048 in the advanced Project Setting doesn't improve the situation. After moving the light for a while, cubes start to disappear more slowly. It eventually stabilizes to something that looks like this: |
I'm seeing almost identical behaviour in my project on Beta 4 (Windows 10. NVIDIA GTX 2070 super) Vulkan Moving the player causes random tiled meshinstance3Ds to vanish. Behaviour stops when I:
I'm not using a projector texture. Just a vanilla omnilight3d. Sorry to barge into your thread but it looks like the same issue and may help clarify the underlying bug. Project (20Mb, sorry) |
@73v3 Your issue occurs when using Vulkan Mobile, so it is unrelated. Please open a separate issue with the minimal reproduction project attached. |
Apologies. Renderer was actually set to forward_plus. Switching to mobile fixes the issue. |
I'm getting this error when closing the editor after observing the behavior:
|
It looks like the issue is coming from here: godot/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp Lines 3732 to 3736 in e25d928
_mark_dirty() is called which frees the surface data, but then for some reason, the surface isn't being reallocated. This will take a bit of investigation to figure out.
We need to check why the surface isn't being reconstructed in some cases (it appears totally random, so maybe some undefined behaviour has snuck in). |
Looks like this is caused by the multithreaded culler which is only activated if the number of instances is a scene is greater than 1000. The threshold is configurable, so it can be increased to avoid this issue in the meantime
|
Godot version
4.0.beta3
System information
Windows 11, AMD Vega64 Driver 22.8.1, Vulkan
Issue description
When a scene has a large number of MeshInstance3D nodes (more than 980 in the MRP) and a Spotlight3D or Omnilight3D with a projector texture is added to the scene and moved around, Godot will randomly stop drawing meshes. Reloading the scene will restore them. This occurs within the editor as well as at runtime.
light_projector_bug.mp4
Steps to reproduce
Minimal reproduction project
Light_Projector_Test.zip
The text was updated successfully, but these errors were encountered: