-
-
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
2D Light Occlusion appears broken in 3.5.2 and also 4.1 #79783
Comments
In previous versions the light would not illuminate the occluded tile/sprite when the 2D light overlaps, at least it seems this way in this tutorial from 4 years ago (Godot 3.1). In the tutorial it is quite straight-forward to get it to work, nothing extra is done. https://www.youtube.com/watch?v=QsCfx-jjS0U (edit: fixed the link) |
Maybe something was lost in translation here? The reason I 'claimed' that this worked as intended in 3.1 (4 years ago) was because the YouTube video was posted at that time and it says Godot v3.1 in the title. It obviously worked when the tutorial was created, you can see if you watch the video or look at the screenshot I provided from the tutorial (It looks like it was created in Ubuntu Linux). Here's a time stamp on the video (5:38), when the shadow is enabled you can clearly see the tile is not illuminated by the light. In my humble test with v3.1 I wasn't able to get the light texture to appear once the shadow was enabled - it just turned into a block and didn't cast shadows, so I couldn't varify it working at all. |
There's a known issue in Godot 4 where you have less control over light/shadow display compared to 3.x, but I can't find the link to that issue right now. |
Would love to see a fix for lights inside occlude shapes, I have scenes casting shadows, but as soon they move in front of a light hanging on the wall behind, the scene is lit up instead of the light just being completely blocked. |
Thank you, that works perfectly 👍 |
Godot version
3.5.2 and also 4.1
System information
Windows 11, GLES3 (3.5.2) & Mobile (4.1)
Issue description
2D Light Occlusion doesn't work as intended in both 3.5.2 and also 4.1.
Creating a simple scene with a tilemap, tiles set to occlude
(This also happens when using a Light Occluder2D on sprites)
Adding a PointLight2D with texture and shadows enabled.
In Godot 3.5.2 when you enable Shadow the texture turns to a block:
In Godot 4.1 shadows work until the Light2D moves over the occluded tile or sprite, then the object becomes lit, when it should stay dark.
Steps to reproduce
Creating a simple scene with a tilemap, tiles set to occlude
(This also happens when using a Light Occluder2D on sprites)
Adding a PointLight2D with texture and shadows enabled.
In 3.5.2 move enable shadow, the texture turns into a block.
In 4.1 shadows work until you move the 2D light over the sprite/tile, then it becomes illuminated when it should stay dark.
Minimal reproduction project
Test Occlusion Tilemap Shadow 3.5.2.zip
Test Occlusion Tilemap Shadow 4.1.zip
The text was updated successfully, but these errors were encountered: