Download

Material blueprint error- Linear Color texture is outputting a float3?

I’m trying to multiply a Linear Color texture sample (in this case, a normal map with an alpha mask applied) by a float4 vector. However, the compiler will often claim that this can’t be done because it’s a multiplication of a float3 and float4.

I’ve previewed the alpha channel to ensure it’s outputting things, and it is. So by all accounts all four channels are in play. I’m not sure why the compiler would object to this multiplication. Why would the output of the texture be a float3 and not a float4?

Texture Samplers are vec3 by default if you use the top-most output, even if it includes an alpha channel. In order to get a vec4, append the top and alpha outputs.