Stencil Buffer Masking Flexibility Question

Node-based Shader Editor
Post Reply
JosephHorsmann
Posts: 10
Joined: Mon Oct 08, 2018 2:32 pm

Stencil Buffer Masking Flexibility Question

Post 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.79 KiB) Viewed 5987 times
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Stencil Buffer Masking Flexibility Question

Post 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.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
JosephHorsmann
Posts: 10
Joined: Mon Oct 08, 2018 2:32 pm

Re: Stencil Buffer Masking Flexibility Question

Post 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.
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Stencil Buffer Masking Flexibility Question

Post 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: http://amplify.pt/forum/viewtopic.php?f=23&t=897
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Post Reply