If you want to use your material functions, you cannot have parameters inside them. You need to use function inputs.
These will the nshow up as input pins of the function node when you grad it into your material graph.
The reason why material functions cannot have paramters inside them is to prevent ambiguities if a function is used multiple times in one material graph.
So here is a quick example of material function use…
This is a function that lets you specify a mask channel, a tint color and a boolean to enable or disable (set to black) the output:
This function is used several times in another function. See, no parameters yet. Only the red input nodes.
this function has two outputs. One for the diffuse and one for the combined alpha. It basically blends 4 colors based on a mask texture onto a background color:
And in the material, finally, the parameters are set up:
Now I can create material instances, or create double blend where I lerp two of these nodes together, etc…
So: Materials have parameters, function have inputs
Hope that helps
PS … In case MF_Grass, etc are your functions… lemme see them … (just found them in your screenshot :rolleyes:)