1 Shader Function - 2 names
1 Shader Function - 2 names
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.
- Ricardo Teixeira
- Posts: 954
- Joined: Fri Aug 09, 2013 2:26 pm
Re: 1 Shader Function - 2 names
Greetings,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.
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!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
- Ricardo Teixeira
- Posts: 954
- Joined: Fri Aug 09, 2013 2:26 pm
Re: 1 Shader Function - 2 names
Just confirmed it, we can't have any duplicates as they are treated as standard shader Material Properties.(not an ASE limitation)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.
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!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!