So, material functions actually CAN contain material parameter nodes?

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?

Hey Robert -

Starting with 4.6, Material Functions can now contain Material Parameters the same as any Material. This was a new feature just recently and our documentation has not quite caught up yet, but these parameters should remain usable going forward from 4.6 and later. I have alerted our documentation team to the needed corrections.

Thank you for your question -

Eric Ketchum

Thanks a lot!