1 Shader Function - 2 names

Your feedback is very important to us. We are listening.

1 Shader Function - 2 names

Postby riyusaki » Fri Oct 05, 2018 12:30 pm

Good afternoon, I would like to know whether it is possible to call the same function several times in the Shader, but use a new name every time? For three different techniques, I need to use the same function, but with different values. Having created one function and called it 3 times, I see only one copy of it in the material settings, because all three functions have the same name. I would not like to create 2 more functions with duplicate functionality, but with a different name. Thanks for your help.
Снимок-экрана-2018-10-05-в-15.21.57.png
Снимок-экрана-2018-10-05-в-15.21.57.png (161.03 KiB) Viewed 2139 times
riyusaki
 
Posts: 4
Joined: Thu Aug 30, 2018 5:31 am

Re: 1 Shader Function - 2 names

Postby Ricardo Teixeira » Fri Oct 05, 2018 3:27 pm

riyusaki wrote:Good afternoon, I would like to know whether it is possible to call the same function several times in the Shader, but use a new name every time? For three different techniques, I need to use the same function, but with different values. Having created one function and called it 3 times, I see only one copy of it in the material settings, because all three functions have the same name. I would not like to create 2 more functions with duplicate functionality, but with a different name. Thanks for your help.
Снимок-экрана-2018-10-05-в-15.21.57.png


Greetings,

I believe that specific implementation was added to avoid possible issues but I'll double check with the developers if there's an alternative, planned or currently available.

In the meantime, I recommend creating individual Inputs for values that need to be unique.

Thanks!
Sales & 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
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: 1 Shader Function - 2 names

Postby Ricardo Teixeira » Fri Oct 05, 2018 3:45 pm

riyusaki wrote:Good afternoon, I would like to know whether it is possible to call the same function several times in the Shader, but use a new name every time? For three different techniques, I need to use the same function, but with different values. Having created one function and called it 3 times, I see only one copy of it in the material settings, because all three functions have the same name. I would not like to create 2 more functions with duplicate functionality, but with a different name. Thanks for your help.
Снимок-экрана-2018-10-05-в-15.21.57.png


Just confirmed it, we can't have any duplicates as they are treated as standard shader Material Properties.(not an ASE limitation)

An alternative would be to create a specific input so you can assign different values and names in the actual shader canvas.

Apologies for the inconvenience.
Sales & 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
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests