- Home /
Question by
midrangemonroe · Feb 22, 2016 at 12:56 PM ·
shaderspriteshadersoverlap
Displaying part of sprite that overlaps with other gameObject
I am making a game where a player is walking through a dark maze. The majority of the screen will be pitch black, but a circle centered on the player will "illuminate" enemies. How would I make the enemy sprites pitch black, except for the portions that overlap with the circle? The answer seems to be with using shaders, but the issue I found is that the answers online are usually to have the circle hide the enemy, rather than display them. Keep in mind I am also not very experienced with shaders.
Thank you.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612065128im_/https://answers.unity.com/themes/thub/images/avi.jpg)