Making a shader to be invisible to light

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

Hello everyone, i got a bit of a pickle to solve…

i had a neat idea for the graphics of my 2D game, i want to have light2D nodes around the scene and all of the areas that are not under the light will have a sprite. Basically i want to create the shadows “manually” by pen. I did some scratches on a texture and my idea was to make a shader to make this texture invisible when touching light2D.First i tought about using light masks and other types (like sub), but i don’t think this is the way to do it, shaders seem more elegant.

Well anyway, thanks for you time.