Dark at the edges

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Sakura37

I want to make the background a little darker(like a gradient, where the black is at the edges and the white is near the player). I have some parallax backgrounds and i tried to use canvas modulate, but it doesn’t work. The light works when i change “layer min” to -1, but i can’t achieve what i want without the dark(in the game is night,but not completely black)

:bust_in_silhouette: Reply From: i_love_godot

What about using a vignette frame? A semi-transparent sprite that is most transparent by your player but gets increasingly opaque towards the edges. Hope this helps.

Vignetting on Wikipedia

if i want to have fire flies at the edge(light the moves randomly), will this technique work?

Sakura37 | 2020-01-05 23:26

If there are multiple light sources, no. You could add point lights to each entity and modulate the background to be darker though.

i_love_godot | 2020-01-05 23:34