I already have some solution but I'm new to Unity shaders and I'm afraid that my way is overengineered. I tried to achieve this effect with Sprite Mask, but I didn't figure out how to do a gradient effect. So here is my current solution: I have a separate layer for the Player and Walls. On the Player object is an attached Camera that has Culling Mask which filters other layers than "Walls" (so it draws only the "Walls" layer). I created Render Texture and set it up as an output of the Camera. I also want my player to be able to change colors so there is an input color. Now this is what the Shader Graph looks like: And this is the result: Currently I'm happy with that. I don't wanna get stuck on it but I wonder If I could do it better.