Shaders Only Draw Unobstructed Part Of Sprite?

Divinik

Member
I have a vision cone sprite that enemies use to signify their field of view. I'm trying to figure out how to make it so that when a part of the sprite is overlapping with another sprite, that part is not drawn.

Basically like a spotlight, where the light would stop where a solid object is.

Any ideas?
 
Top