How to use a material function with a channel-packed texture?

I don’t understand how that helps…?

Let me explain it a different way:

  1. I have a channel-packed texture with different greyscale textures in each RGB channel.
  2. I have a material function which has a texture input. As far as I can tell, you can only have a Texture2D (ie. TextureObject) as an input for a material function, you cannot have a TextureSample.
  3. I want to feed just the red channel from my texture into this material function.

In the material with the texture and the material function I could either:

(a) Have the texture as a TextureObject, which I can connect to the material function, but cannot use a ComponentMask to only get the red channel - the whole texture and all its channels are passed into the material function.

(b) Have the texture as a TextureSample where I can either use a ComponentMask or just drag straight off the red channel to get the part of the texture I want, but I cannot connect this to a material function. It says ‘Float is not compatible with Texture2D’.

What I need is to be able to convert one channel of a texture into a Texture2D. It seems crazy you can’t do this. But maybe I’m misunderstanding what you’re suggesting?