Godot Light2D as an area light instead of point?

Viewed 726

I notice that all Light2D nodes are emanating from a single point, even if the image being used is wide and solid. Is there a way to have a light be emitted from the entire area of the sprite and not just from a single point?

When I have "day light", I want it to light the whole level evenly. Or if I have a large spotlight I want it to feel like a giant beam instead of a single point.

Thanks!

1 Answers

When I have "day light", I want it to light the whole level evenly.

Instead of using Light2D for this purpose, directional lighting in 2D is best simulated using a custom shader or the CanvasModulate node. That is, until Godot 4.0 is released with built-in support for 2D directioal lights.

Or if I have a large spotlight I want it to feel like a giant beam instead of a single point.

Unlike 3D lights, 2D lights don't make a distinction between omni and spot lights. Use a texture that looks like a spotlight (viewed from above), such as a "cone" with a 45 degree angle.

Related