- Home /
How to do 2D graphics like this ?
Hi,
I'm looking for a way to do graphics like this game : https://www.youtube.com/watch?v=kiQTvvDWUO4
When the player is behind a color, we are able to see it in white.
Does somebody can help me ?
Thanks.
Have a look at stencil masking, I guess that is what you are looking for.
Answer by merkaba48 · Aug 09, 2017 at 11:45 PM
I don't know exactly how to do it, but I'm pretty sure you'll need to have a custom shader and use rendertextures. It's not straight-forward. I think the way it would work is, you render the player's line to its own rendertexture, probably in black&white, and then blend that with the scene's rendertexture and in the shader compare the pixel colour of the player RT with the colour of the scene RT.
Your answer
Follow this Question
Related Questions
Why Sprites-Default shader hasn't any fallback? 1 Answer
Shader Overlay Texture 0 Answers
How to resize shader area? 0 Answers
Do TEXCOORDS need to be in sequence? 1 Answer
Double sided pass? 2 Answers