0 votes


I'm quite new to Godot, and am running into issues with Light2D. Since I'm unsure if I'm doing something wrong, I'm posting this question here before submitting a bug report.

A bit of background on the project:
Godot version: v3.2.1
Game type: 2D
Render engine: GLES3
Targeted platforms: Mac, HTML5
Development platform: Mac

In the project I'm working on, I have a KinematicBody2D with an attached Light2D. The light 2D has a PNG texture, a color and the mode is set to Add.

One of my target platforms is HTML5 (itch.io), so to get it running on Mac, I had to change the render engine to GLES2. Upon changing, I saw that the behavior for the light is completely different, so I'm unsure if this is intended behavior, something I'm doing wrong, or an issue to report.

Here's a quick screencap of the difference. These are both running directly from Godot (within the editor the issue appears worse, but it's a preview so unsure it's really an issue):


asked May 25 in Engine by mrabrams (12 points)
edited May 25 by mrabrams

1 Answer

+1 vote

Maybe it has something to do with how GLES2 handles lights? There's also differences in blending, as found in this article. For textures with an alpha channel, reimport them in ā€¯Uncompressed, Lossy or Lossless compression mode". It also says that blend shapes are unsupported in GLES2.

answered May 25 by Ertain (1,129 points)

That's an interesting point! After a lot of testing, I realized that the light size and texture scale were causing most of the issues.

Eventually I sorted the issue by using this setup (should it be useful to someone later on):
1. Use a larger Light2D to illuminate the background and work with other light occluders
2. Add a Texture node to simulate the tint the light was causing on the Sprite
3. Change the light mask on the sprite so the light doesn't affect it.

Thanks again for the suggestion!

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.