Material function input errors??

Hello all,

So I am having a few issues parameterizing the shader I am working on. I have a material function that takes a Texture2D as an input, feeds into break material attributes and its base colour, normal etc. are placed into the correct slots.

However, in the master material when I take a texture2D parameter and plug it into the slot I get an error saying “Cannot cast from float3 to texture2D” I am very confused…I get that I can’t put red into the texture2D channel as it will be looking for all 3 channels in the function. But I am plugging in the texture, to a texture input???

As I said…very confused :s Am I missing an extra step in breaking down the texture in the master material?

You need to use a TextureObject node instead. A regular texture sampler is outputting a float3 and won’t work with material functions like this one.

Ahh thanks man I thought I might have been missing something :slight_smile: