Skip to content
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

Overlapping Light2Ds on a "light only" Sprite2D blows out sprite's alpha #86470

Open
romlok opened this issue Dec 23, 2023 · 2 comments
Open

Comments

@romlok
Copy link
Contributor

romlok commented Dec 23, 2023

Tested versions

Reproducible in:

System information

Godot v4.2.1.stable - Debian GNU/Linux trixie/sid trixie - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (nvidia) - Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz (6 Threads)

Issue description

If you have a Sprite2D which uses the "Light only" light_mode on its material, multiple overlappingLight2Ds will increase the sprite's alpha beyond that of the sprite's texture, even if both lights are set to blend mode "Mix".

Screenshot_20231223_133405

Maybe I'm misunderstanding something, but under these circumstances I would expect that the alpha of the light-only sprite should be capped at the original texture's alpha.

Steps to reproduce

  1. Create a Sprite2D with semi-transparent areas
  2. Give the sprite a CanvasItemMaterial with a "Light Only" light_mode
  3. Add two solid white PointLight2Ds to the scene
  4. Give both lights a blend_mode of "Mix"
  5. Overlap the lights on top of a semi-transparent area of the sprite
  6. 👀

Minimal reproduction project (MRP)

Single scene: lights_overlap.zip

@dalexeev
Copy link
Member

Light only mode was not properly fixed, see #75181. Maybe the workaround mentioned in this comment will help you.

@romlok
Copy link
Contributor Author

romlok commented Dec 23, 2023

Light only mode was not properly fixed, see #75181. Maybe the workaround mentioned in this comment will help you.

Unfortunately, setting the sprite to "add" instead of "mix" just aggravates the blown out alpha:
Screenshot_20231223_154120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants