Page 1 of 1
1 Shader Function - 2 names
Posted: Fri Oct 05, 2018 12:30 pm
by riyusaki
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 (160.33 KiB) Viewed 4534 times
Re: 1 Shader Function - 2 names
Posted: Fri Oct 05, 2018 3:27 pm
by Ricardo Teixeira
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!
Re: 1 Shader Function - 2 names
Posted: Fri Oct 05, 2018 3:45 pm
by Ricardo Teixeira
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.