I am trying to make a texture which is rendered over game objects, but is not rendered at all where it is within a unit's range. I think this should be possible using textures if I pass a lot of uniform information, including the newly supported uniform arrays. My main problem is converting each fragment's coords to world coords and then checking if it is in unit range.
I have also tried Light2D with mask mode as a Fog of War solution. But Light2D in mask mode has complex and unexpected behavior when the lights overlap; that is, when two units can see the same space.
Below's my shader, but I'm not sure it makes sense and it might just be easier to start over, so take it with a grain of salt.