How do I use StaticSwitch in material functions with a texture?
I'm trying to create a material function that allows me to swap between using either one of the RGB channels, essentially texture packing. I'm trying to create a base material that I can create a material instance and have control over what channel to use.
currently i have my a texture same with each channel (minus alpha) connected to its own StaticSwitch with a FunctionInput(staticBool) plugged into the Value. a 0 vector 1 node is plugged into the False.
and inside the base material i have 3 StaticBaseParameters, one of each slot in the material function and a slot for the texture parameter.
unfortunately this yields and error "Cannot cast from float4 to texture2D".
I'm pretty sure i'm going at this the wrong way but any guidance would be greatly appreciated!
Show a screenshot of your Material.
Not sure why you're using this when StaticComponentMaskParameter exists.