Gradually dimming a scene and Light2D

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

I would like to implement a day/night cycle in a 2D game I am working on. How would I go about dimming everything in the scene, but in a way that Light2D sources would illuminate nearby objects? I tried using a CanvasLayer > ColorRect, and fading in and out the ColorRect, but that also dims the Light2D sources. Is there a different way to make this work?

:bust_in_silhouette: Reply From: BraindeadBZH

I don’t have a definitive answer, but I would look into shaders.