Open bluepandion opened 3 years ago
Related to https://github.com/godotengine/godot/issues/31824 and https://github.com/godotengine/godot/issues/8685. Can you check if either of those issues are duplicates?
Related to #31824 and #8685. Can you check if either of those issues are duplicates?
I don't think they are duplicates, because they seem to affect rendering based on bounding boxes of the lights. Based on those issues I'd guess masking somehow needs to disable any other lights that would affect the same pixels, but I'm only guessing.
This issue affects single pixels, not whole nodes.
Can confirm this has existed since at least Godot 3.1.2. I'm not sure whether it is a bug, or a feature.
Definitely not a feature, this is very unwanted behaviour. Alpha should be conserved.
Godot version: 3.3.2 stable
OS/device including version: Windows 10, Nvidia GTX-960
Issue description: Light2D affects alpha-channel and produces visible aliasing when lighting is strong enough. All affected non-zero alpha values are seemingly increased, until the resulting image looks as if it had 1-bit alpha.
This is especially apparent when textures have soft alpha-gradients or large areas that are partially transparent.
Proposal behavior for Light2D additive blend mode: source.RGB = source.RGB + (light.RGB * light.A)
This issue is present in both GLES2 and GLES3
Steps to reproduce: Add a Sprite with partially transparent areas. Add a strong Light2D or multiple lights that affect the sprite.
Minimal reproduction project: light2d_alpha_channel.zip