I am trying to build a blend shader that blends together 4 different tileable materials through a RGB texture or vertex color. Here it is working:
Right now its all hard coded into the shader and it works fine, but I want to organize it so I can use Material Instances.
Here is my issue, I want to be able use prepacked material functions because I can hook up all the tileable textures I need to the material function instead of hooking up every tileable texture to every layer of the material instance. Here are some screenshots to help show what I mean.
Material Function 1, for a tileable red brick:
Here is how I am using the material function of the tileable red brick in the base shader:
Here is what I want my material instance to look like:
I know I can individually hook up every texture in the material instance, but I really want to figure out how to use these material functions as quick presets to grab and change materials around.
Thanks for any help with this!
Replies
If number of layers = 4 then return the 4 blended layers
if number or layers is less then 4, then look if its equal to 3. If so, then return it without the top layer. If number of layers is less then 3, then look if its equal to 2 etc...
This is what I do, and it works nicely for me, but its a bit different from how you want to use it, so you may want to change the function inputs from float to material attribute. I use it so affect channels of the material. If you need further assistance then shoot me a message, and I can explain how to change it to your need.