The basic idea is that a part of a sprite changes color when the player is close. Therefore i thought get the distance of the player and the fragment( pixel ) and check if it is lower than a specific threshold. To only change a part of the sprite check if the color of the pixel is equal and then change it to the illuminated color. I struggeled to implement this idea since i am farily new to shader programming. Can someone please help me? My goal is to recreated this cool effect which i recently saw on pinterest.