• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

Shaders Only Draw Unobstructed Part Of Sprite?


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?