Question by
alicewithalex · Nov 15, 2018 at 08:01 PM ·
shaderdrawingdepth-buffer
How draw only on object behind another object(like stencils)? (Using Ink Painter Asset)
Hello - I am new at Unity, but i want to create a graffiti game in VR - i am using Ink Painter Free Asset from Asset Store and i am very happy with it) But i can't imagine how use stencils in realtime. For example: I draw something on wall and place my other hand between wall and spray - so in real life only area not behind hand will be colored with spray. I saw this effect on youtube - and guy talk about using depth buffer for it.If it is so - from what point i need to start to writing shader or another code? I thing that i need get some texture at the moment then i pressing spray button and use it like stencil for current area in UVs - is anybody can help with it? Very thanks - sorry for bad English :) Good luck to all!
Comment