-
-
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: PointLight2D not working with CanvasModulate #58688
Comments
I just stumbled upon this bug myself. It seems that the more darker modulation is, the more washed out textures will be. I wonder if it's something like (in pseudocode)
That would explain why color information gets lost. I tried to search in source, and I feel this is what is going on (the shader code is quite convoluted so I couldn't 100% confirm what is happening). |
@aXu-AP I'm quite new to programing and I'm having troubles even trying to find where did you find this part of code, I would like to see what's going on and maybe try to do something with it, I have been searching the files for some time but no luck, can you please say me what file is this thing in? Thanks |
Oh, sorry, that was pure speculation on my part. The actual computation is in the canvas shader I believe. However, for my untrained eyes it's hard to read all that shader code and not be overwhelmed. It's quite complicated and covers wide array of cases. |
Duplicate of #49922. |
Godot version
4.0 alpha 3
System information
Linux Mint Cinnamon 20.3 x86_64, GPU: nvidia geforce GTX 1650 mobile, Vulkan
Issue description
Hello, I'm facing a problem with lighting in Godot 4, I'm trying to get my entire screen black (using CanvasModulate) and then using PointLight2d on it. Instead of "showing" the original texture of the background the light just draws its texture on top of "CanvasModulated" background
reddit post: https://www.reddit.com/r/godot/comments/t3fdq4/lightning_in_godot_4/hyxz41x/?context=3
Steps to reproduce
Add sprite to the scene, add CanvasModulate, make it black and the add PointLight2D with a texture
Minimal reproduction project
lights.zip
The text was updated successfully, but these errors were encountered: