Amplifying your potential.

Query Mask Clip value within the shader

Node-based Shader Editor
4 posts • Page 1 of 1

Query Mask Clip value within the shader

Postby sethhall » Sat Sep 22, 2018 11:58 pm

Hi,

I'm working some Opacity Mask stuff and am trying to use the Mask Clip parameter. When I plug a node into the Shader.OpacityMask attribute I see that the 'Mask Clip Value' parameter shows up in the Inspector.

Is there any way to query that parameter? There is the 'Template Parameter' node but unlike teh Particle Texture, I can't use it to template the Mask Clip. That being said, is there any way to access this value within the shader itself?

Thanks,

Seth
sethhall
 
Posts: 15
Joined: Mon Jun 25, 2018 11:09 pm

Re: Query Mask Clip value within the shader

Postby Amplify_Borba » Mon Sep 24, 2018 10:05 am

Hello Seth!

The Template Parameter node is only meant to be used within templates, to access shader properties and global variables declared over the current template shader.

In the Surface shader, you can either create a Float property with its Property Name set according to the shader property you want to access, the Type set to 'Global' and the Variable Mode to 'Fetch', as per the example below:

Image

Or you can configure the Mask Clip Value by a custom shader property, which will allow you to access its value through the node you set up for this effect:

Image

Please let me know if this helps, thanks!
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!
User avatar
Amplify_Borba
 
Posts: 736
Joined: Mon Jul 24, 2017 9:50 am

Re: Query Mask Clip value within the shader

Postby sethhall » Tue Sep 25, 2018 12:22 am

Ahhh! Perfect. This is exactly what I was looking for :D .. Thank you.

Seth
sethhall
 
Posts: 15
Joined: Mon Jun 25, 2018 11:09 pm

Re: Query Mask Clip value within the shader

Postby Amplify_Borba » Tue Sep 25, 2018 7:38 am

Glad to know, please don't hesitate to get back in touch if you have any further questions, thanks!
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!
User avatar
Amplify_Borba
 
Posts: 736
Joined: Mon Jul 24, 2017 9:50 am


4 posts • Page 1 of 1

Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 1 guest