- Home /
Question by
mjglatzmaier · Jan 20, 2021 at 09:02 PM ·
shader programmingshaderlabmeshesstencil
Unity shader question - mesh subtract boolean operation (stencil buffer)
Hi - I'm trying to achieve a subtract operation between two meshes using the stencil buffer. The example in the Unity manual for the stencil buffer is quite close to what I want to achieve. The code is at the end of https://docs.unity3d.com/Manual/SL-Stencil.html
The issue is that I cannot "see" through the cut mesh. Here's an example shot
Everything is working except being able to "see" the sphere. I've tried to cull backfaces in the surface shader code linked above, but haven't had any luck. Thanks in advance!
example-view.png
(145.5 kB)
Comment