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?

https://scontent-a-lhr.xx.fbcdn.net/hphotos-prn1/t1.0-9/1959216_10152051966492986_2018860340_n.jpg

https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-ash4/t1.0-9/1531549_10152051966497986_1650716329_n.jpg

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: