I have my game normally setup as such:
and I'm trying to create "specific" dark regions within the game as such:
so that whenever a light source is present it would "light up" the view by making the ColorRect
transparent within the texture provided to the light2D (a photoshoped image of what I'm trying to achieve) :
I tried this demo but it only lights up the image instead of making it transparent
I also tried this demo but it seems to apply to the entire game instead of a particular region and I would have to change the properties of all objects entirely throughout the game
Is what I'm trying to achieve possible? Or is there a alternate approach I should be taking altogether?
Note, you might ask:
"Why don't you just add a shader to the ColorRect to make the desired region transparent?"
Because there are multiple light sources and it wouldn't be possible to tally them all and add them into a shader