Godot 4 - Lighting gradient issue

Godot Version



I am not able to achieve a smooth lighting gradient in Godot - I have tried using custom gradient textures and various built-in radial gradient 2D settings, including default one with the following fill:

From: 0.5, 0.5
To: 1.0, 0.5

No matter what settings and gradients I use, there seems to be a hard “cut off” line (2) which doesn’t look good. Is there a way to achieve a smooth transition from black to natural color as lighting on attached screenshot does not look good, i.e. obstacles seem to ignore the gradient curve?

Image walking through a dark room and instead of objects appearing smoothly, they are very bight even where the light radius ends.

See below example:

Green rectangles are way to bright at the end of the gradient and don’t get darker smoothly, but are quite bright to the mentioned “cut off”:

Green rectangle should get gradually darker from line (1) towards outside, but is quite bright up to line (2) which is almost at the texture end. How can I achieve a uniform and smooth light to dark transition on all objects?

You’ll need to play with the gradient colors and interpolation values until you get something you like.