0 votes

I have a Light2D node on Mix mode. It works as expected, darkening the screen based on the texture alpha which I change using canvas modulate. However there are two situations where it doesn't work.

  1. Overlapping particles change colour. A single particle on its own seems to look normal, but overlapping areas of the particles are darker – almost as if their colours were being added.

    Correct - particles don't change colour when Light2D disabled

    Incorrect - overlapping particles get darker

  2. When exported to HTML5 the problems get even worse. The red particles in the first part are not rendered and the silhouettes of any textures rendered on top of each other are all visible, as if the colours were being added and not masked.

    Correct - textures and sprites obscured by those with higher z-index

    Incorrect - Weird x-ray effect as silhouettes of hidden nodes are visible

Have I misunderstood the way Light2D works or are these bugs?

asked Jul 10 in Engine by camarones (87 points)
edited Jul 11 by camarones

1 Answer

0 votes
Best answer

It appears to be a bug. I have submitted a report to Github. https://github.com/godotengine/godot/issues/20098

answered Jul 12 by camarones (87 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.