- Home /
2D stencil cut out
I'm trying to create a stencil shader mask and diffuse that work the same as "Mask OneZLess" and "Diffuse NotEqualOne" where the mask object doesnt render and it creates a cut out effect on the diffuse
This is the 3d example where the sphere cuts out part of the blue cube showing the black cube behind. I'm trying to achieve this effect in 2d.
The mask on the sphere works with this stencil: Stencil { Ref 1 Comp always Pass replace }
The Diffuse on the blue cube works with this stencil: Stencil { Ref 1 Comp notequal Pass keep }
capture2.png
(22.5 kB)
Comment