[2D] Generating small translucent circles inside a large rectangle
Hi everyone,
My game has dark areas, and due to several constraints, I'm using a dark, translucent rectangle in front of the camera to simulate darkness. I want torches and other items to "cut" circles of light inside this rectangle.
Simply adding light to those items won't do. They look "foggy", because the translucent dark rectangle is still covering the light source.
Using masks is a problem, since there can be several light sources, some of which are constantly moving. I also have pixel perfect scripts which aren't too mask-friendly, either.
This is what I'm aiming for: .
If I could cut the circle's light as a gradient instead of a solid cut, it would be perfect. I'm not sure if this can be done without a parent-child relationship between the rectangle and the circles, though.
Thanks in advance!