The documentation says that material functions are not allowed to contain material parameter nodes and must only use input parameters. But I found out that this is not actually accurate. When I place a parameter node inside a function and use this function in my material, parameters declared inside the functions get added to the material’s parameter list (and can be changed on an instance). When functions use same name for a parameter, they share it’s value.
This is actually quite useful in my case because I am building a very complex material and parameters need to be shared between many functions. Passing them through function inputs would not make the graph clearer and easier to maintain!
So I like this feature, but is this actually supported and will future engine versions keep the same behavior? Or is this just a bug?