-
-
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
Vulkan: Light2d Blend Modes do not behave correctly #49922
Comments
Indeed, the 2D lighting system broke in various ways at some point earlier this year (or last year). It would be good if someone could bisect it, although it'll require a lot of build steps (likely 20 or more). |
@Calinou To my surprise, after compiling a bunch of different builds starting from March 2021, all the way back to December, 2020 (when GFS made his video). I found the I'm not sure if Light2D was changed or if this a documentation issue and maybe PointLight2D needs to be setup differently than before. Although we should just be able to select a light texture like before, but with Vulkan and single pass lighting, there might be more the user needs to do |
The setup process remains exactly the same, even if Vulkan and single-pass lighting is used behind the scenes. |
The build that still had a working 2d light system dates all the way back 28 November 2020 when it was shown in the article about godot 4.0's improvments , so I think thats a good starting point to do what @Calinou suggested |
Added on to that I think it would also have the code to fix #55806 |
actually this didn't break - it was broken since implementation. so this issue is really not about blend mode mix specifically, but about different behavior when omitting normal maps.
this one actually did work initially with vulkan and broke later. I've identified the commit and posted it in that issue. |
I tried to fix this, but couldn't get it quite right. While mix and add blend modes look similar to what they looked like in godot 3.x, subtract looks cleary off. If anybody wants to have a look, this is the branch: https://github.com/sakrel/godot/tree/vulkan-fix-2d-light-blending |
There are definitely still issues with this. In Godot 3.5 it looks like this: While the same-ey setup in Godot 4.alpha14 looks like this: perhaps related to #58688? |
from what I remember when creating #58688 it is the same thing |
One more thing: I used Add mode, not Mix mode in my setup. So it looks like the title of this issue is slightly wrong. |
In godot3, add a CanvasModulate node, and then a PointLight2d node. Set the CanvasModulate color to black and the light will illuminate things in range, this doesn't work in godot4. The documentation is also not updated and the 2D lights don't seem to be maintained! |
@PoisonousGame this should probably be under a different issue (or multiple if necessary). If there is no specific fitting issue that is already opened with a minimal reproduction project, please feel free to create one. Please don't spam other issues with copy/paste. Also note that Godot 4 is not production ready and anyone who is leading you to believe that it is; should not be doing so. With regards to documentation, it would be an effort in futility to "update" parts of it that are still subject to change/overhaul before release. |
This commit f123981 might contain some hints about what the issue might be. |
Fix broken 2D light blending, addresses #49922
Godot version
4.0.dev (fdccc0b)
System information
Windows 10, Vulkan, GTX 1070
Issue description
Setting a Light2d to Mix blend mode does not produce the expected results:
3.2.3:
4.0.dev:
Steps to reproduce
Minimal reproduction project
Without explicitly setting it, 4.0 changes the light source back to add mode on import.
Light Mix Test 3.2.3.zip
Light Mix Test 4.0.dev.zip
The text was updated successfully, but these errors were encountered: