0 votes

Ok. So I have a regular Light2D on my scene. There are parts of the scene that are not lit up by the light and as a result are showered in darkness. This darkness, obviously, is black. I'm wondering if there's any way in which I can make this darkness a different color.

Hopefully I'm explaining myself correctly.

Godot version 3
in Engine by (12 points)

You can use a shader to replace the black with a different color.

I'm not very familiar with shaders. Could you elaborate a bit more on how I would go around doing this?

1 Answer

0 votes

As it says in the Documentation:

Light is defined by a (usually grayscale) texture, a color, an energy
value, a mode (see constants), and various other parameters (range and
shadows-related).

so you should be able to control it by just changing the color in the editor.

by (87 points)

But that changes the color of the light, not the color of the parts that are not lit, which remain black.

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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.