godot
godot copied to clipboard
OpenGL: _shadow_atlas_find_shadow: Condition "!sli" is true. Continuing.
Godot version
4.2 beta 5
System information
Godot v4.2.beta5 - Linux Mint 21.2 (Victoria) - X11 - GLES3 (Compatibility) - GeForce GT 525M (nvidia; 390.157) - Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz (8 Threads)
Issue description
Getting error when using Shadows in SpotLight3D:
E 0:00:55:0236 _shadow_atlas_find_shadow: Condition "!sli" is true. Continuing. <C++ Source> drivers/gles3/storage/light_storage.cpp:954 @ _shadow_atlas_find_shadow()
Steps to reproduce
Minimal reproduction project
https://we.tl/t-FpjcvyZYws
I can't reproduce this on 4.2.beta da0b1eb12 in a scene that has DirectionalLight3D, OmniLight3D and SpotLight3D with shadows enabled when using the Compatibility rendering method (Linux, GeForce RTX 4090 with NVIDIA 535.113.01).
Please upload a minimal reproduction project[^1] to make this easier to troubleshoot.
[^1]: A small Godot project which reproduces the issue, with no unnecessary files included. Be sure to not include the .godot folder in the archive (but keep project.godot).
Drag and drop a ZIP archive to upload it. Do not select another field until the project is done uploading.
Note for C# users: If your issue is not Mono-specific, please upload a minimal reproduction project written in GDScript or VisualScript. This will make it easier for contributors to reproduce the issue locally as not everyone has a Mono setup available.
While preparing the project, I found out that I was getting this error when restarting or going to the next level. Additionally, I was getting this error multiplied in the full project. In a prepared project, it appears a few times. Here is the project source (pressing r, n, and b will show up as errors). https://we.tl/t-FpjcvyZYws
I can confirm the issue with the MRP. On my system (Linux, AMD Radeon Vega M), pressing "R" repeatedly to reload the scene eventually triggers the error. I can reload the scene 4 times without error, the 5th and following times each print the error message 4 times.
Here's the MRP uploaded directly to GitHub after removing the .godot folder, so it's much smaller:
shadow_error.zip
https://github.com/godotengine/godot/assets/10854855/6b81192a-ef9d-4a8f-87cd-9b7c1c8ef4d2
Reproducible on Linux (KDE+Wayland, Vega 8, no gpu)
Compatibility featureset, messages are flooded apparently when the viewport has direct visual contact with a SpotLight source. ~~Disabling "Use Physical Light Units" from the Lights and Shadows project settings ceases the bug after the restart.~~ nvm everything i said, the error is still flooded with the light source visible.
edited
getting the same error in 4.2.1, as soon as a light is set to cast shadows, the error gets spammed in the console
I've tried the MRP linked in https://github.com/godotengine/godot/issues/84747#issuecomment-1811523248 and still can't reproduce this on 4.2.1 and 4.3.dev 13a0d6e9b (Linux, GeForce RTX 4090 with NVIDIA 535.113.01). This might be driver-specific or timing-sensitive (although I've tried --frame-delay 100 to simulate a slow machine).
However, I can reproduce this if I enable shadows on the OmniLight3D node in player.tscn, even if I disable SpotLight3D shadows. DirectionalLight3D shadows don't exhibit this issue.
If you increase the first shadow quadrant's number of shadow subdivisions, the error will take more time to appear, so you can increase it to 16 as a workaround (at the cost of less detailed shadows up close):
If you do so, I'd also suggest increasing the second quadrant's shadow subdivisions to 16 as well for consistency.
This issue also happens on Windows, can confirm the specific bug is using shadows on a spot light with Compatibility renderer. I wish the Engine would say that it doesn't work with Compatibility mode if that's the case though.
I wish the Engine would say that it doesn't work with Compatibility mode if that's the case though.
All light/shadow types are intended to work when using the Compatibility rendering method. That's why there's no note about this in the documentation (or node configuration warnings) :slightly_smiling_face:
We generally don't list known issues in the documentation as these notes have a tendency to be quickly outdated, unless we are certain the known issue will remain relevant for years.
Howdy all, long time lurker first time poster. Confirming Compatibility mode and Spotlight3D shadows.
Janky "workaround" that I've been using: Zoom away from the scene in all viewports. Errors stop. Compile/run game. No errors when playing.
Any idea if this has been fixed in Godot 4.3 dev 3? i have been having the same issues. I have noticed that at certain camera angles some lights get brighter or darker, others disappear, appear, etc. I am also using compatibility backend, with an Intel HD Graphics 4600. I tried increasing shadow subdivisions, but it seems to have no effect at all.
Any idea if this has been fixed in Godot 4.3 dev 3?
Not that I know of.
I have noticed that at certain camera angles some lights get brighter or darker, others disappear, appear, etc.
This sounds like an unrelated issue. Please open a new issue with a minimal reproduction project attached.
I am also using compatibility backend, with an Intel HD Graphics 4600.
On slow integrated graphics like Haswell IGPs, you probably want to minimize the use of real-time shadows to maximize performance :slightly_smiling_face:
I'd suggest using only directional shadows and no positional shadows (omni/spot). This is what a lot of mobile games do, but even desktop AAA games will do that on low settings.
Can reproduce on Godot v.4.3.dev5.official [89f70e98d]: Compatibility mode. Spotlight with shadow enabled only when the view angle is facing the same Y side as the spotlight and being relatively near the light. It seems to not care about any other object actually affecting the shadow (error even when no object is visible). Aspect ratio of the view seems to affect it, thin and long views requre the camera to be much nearer to the light.
Test scene (it's not really "minimal", but pretty close to it): TestWeb.zip
@DarioDaF This was fixed 4 days ago, which is after the 4.3-dev5 release. Please test with 4.3-dev6 when it's released :)
Makes sense sorry I was confused by the cherry pick for 4.2.* and thought it was a regression without checking the date
I'm always using latest commit from github, built from source, and since some time, i'm getting this:
E 0:00:00:0745 RenderingDevice::screen_create: Unable to resize the new swap chain. <C++ Error> Condition "err != OK" is true. Returning: ERR_CANT_CREATE <C++ Source> servers\rendering\rendering_device.cpp:3158 @ RenderingDevice::screen_create()
E 0:00:10:0335 RenderingDevice::screen_prepare_for_drawing: A swap chain was not created for the screen. <C++ Error> Condition "it == screen_swap_chains.end()" is true. Returning: ERR_CANT_CREATE <C++ Source> servers\rendering\rendering_device.cpp:3169 @ RenderingDevice::screen_prepare_for_drawing()
I'm at v4.3.dev.mono.custom_build [c83177cb7] right now, i remember it used to be fine long ago, but that started happening some time ago. The first error happens once, and then the second get flooded thousands of times per second.
Please open a new issue report, as it's a new issue
The issue is likely the same as https://github.com/godotengine/godot/issues/71929. 4.3.dev has fixed some of the Vulkan device lost issues, but not all of them.