Hey guys,
I'm a very newbie programmer, started messing with the material editor yesterday :P
I'm trying to write a material function to blend 2/3/4 textures by vertex color painting, just to make it easy for me when I'll need to use it (and also for the practice of writing these shaders, it's fun!)
I've successfully blended up to 3 textures, thing is, I can't get the UV tiling input to work :[
Here's my function for blending 3 textures, and my shader setup. Could you please take a look and tell me what I've done wrong? :P
Is this error that I'm getting the reason for it? I don't even know why I'm getting it to be honest, it happens when I preview one of the last function outputs.
Now, I've tried to plug a TextCoord node to my texture files in the shader, and then tile it, it will work fine. I just don't understand why it won't work with my function since it has a TextCoord output that is plugged into the inputs of the textures... I'm lost :poly142:
Replies
Now, I wrote that before I realized what you were really shooting for, which is a material function rather than a material itself. What I would do is break up the function into 2, one UV tiling function that will hook into your TextureParameter (Because TextureObjects are the worst thing ever) and then hook the TextureParameters into your VertexBlend Function. You'll have the added benefit of the flexibility of TextureParameters, and it won't make a Function monster that only works for this specific purpose.
Thanks for your help