Page 1 of 1

Stencil Buffer Masking Flexibility Question

PostPosted: Wed Oct 24, 2018 6:08 pm
by JosephHorsmann
I'm new to Amplify Shader Editor and still figuring out a lot of the settings in the Output Node.

I have a shader that I've found I want to use on images with and without a mask. I am applying my shader to a UI Image via a material. I've had success getting it to be visible with the mask, or hidden by it, by toggling Comparison in the Stencil Buffer between Less or Equal and Greater or Equal. Unfortunately, when it is visible on an image with a mask, it is invisible on an image without a mask. And visa versa.

What I want to do, and have not figured out yet, is have the material/shader applied to my image be visible without a mask, while at the same time visible within a mask and responding to the masking behavior.

Here are my current Node settings for reference. Any insight you can provide would be greatly appreciated. Thank you for your time.
PIC.jpg
PIC.jpg (86.99 KiB) Viewed 4618 times

Re: Stencil Buffer Masking Flexibility Question

PostPosted: Thu Oct 25, 2018 1:25 pm
by Amplify_Borba
Hey there, can you share a sample of what you've built so far and, if possible, a reference for the type of effect you're trying to build? I'm afraid I didn't fully understand it based on the details provided, apologies for that.

Re: Stencil Buffer Masking Flexibility Question

PostPosted: Thu Oct 25, 2018 8:30 pm
by JosephHorsmann
Hello, and thanks for the reply.

While looking at your reply on my other post about the medal shine effect, I was able to get the UI template working (though I'm not sure why it didn't seem to be working for me previously). Being able to use the UI template solved this issue for me. Masking behaviors work correctly and the image is visible inside or outside of a mask.

Re: Stencil Buffer Masking Flexibility Question

PostPosted: Mon Oct 29, 2018 2:50 pm
by Amplify_Borba
Thank you for letting us know that you've managed to find a solution, I'll just leave a link to the topic here as it might help other users: viewtopic.php?f=23&t=897