0 votes

I have a black CanvasModulate and am using white Light2D's to illuminate the scene. My entities are composed of sprites and ProgressBars (health bars). Even with 100 Light2D Energy, the Green Progress bars appear Yellow, while the sprites are normal (if a little bit dimmed).

How can I fix the ProgressBar tint, while still ensuring they are hidden if not illuminated?

Example below. The Progress bar RGB is set to (0,255,0), but appears yellow due to modulation/lighting.

enter image description here

Edit: If I switch the light mode to Mix or Mask I do not have this issue, but new issues are created with overlapping lights. Mix mode creates an effect like this:

enter image description here

While Mask makes the entire background visible at once.

Edit: It's not a bug, it's a feature. I made the player's lights Mix and everything else Add. This makes the correct colors appear when close to the player, otherwise they can be a bit off (like the yellow bar). It's not what I wanted originally, but it's a good look and will keep until someone can help solve the original problem.

asked Apr 18, 2018 in Engine by jarlowrey (611 points)
edited Apr 18, 2018 by jarlowrey

1 Answer

0 votes
Best answer

Using mix mode was correct. The issue was my light texture was not completely white. I made it with a black/white gradient, and when mixing with other lights the black was apparent. Recreating the light without a black gradient in an image editor fixed the issue.

answered Apr 20, 2018 by jarlowrey (611 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.