Page 1 of 1

Stencil Buffer with Object Clip Position

PostPosted: Thu Feb 07, 2019 3:59 am
by DanikTomyn
Hi Amplify Community,

Apologies in advance for my lack of knowledge, I'm fairly new to using multiple passes and the stencil buffer within my shaders. I'm trying to recreate this effect found in the unity documentation to render cavities of objects clipping together , provided down below and I'm using the example at the bottom of the page.

https://docs.unity3d.com/560/Documentation/Manual/SL-Stencil.html

From reading the example code and adapting it the best I could to ASE I almost have the shader working but I'm having a tough time getting the "Hole Prepare" shader to draw the screen correctly.

Here's my result so far:
Image

Here's The first pass of the Holes Prepare shader:
Image

Pass 2:
Image

Hole Shader:
Image

Any tips or resources would be greatly appreciated.

Re: Stencil Buffer with Object Clip Position

PostPosted: Thu Feb 07, 2019 10:20 am
by Amplify_Borba
Hey there, could you share a sample with us through [email protected], so that we can look into your template and see if there are any potential issues? Thanks!