Error at Preview Weight

Hello! I’m creating a material for my terrain. I’m connecting textures (rgb and negative) to Layer Blend with Height Blend Type. When I change the preview weight, the editor showing error like “Error [SM5] Arithmetic between types float3 and float4 are undefined”. I can’t show the screenshot because I’m away from my laptop

Hi, somewhere in your material you used a float3 vector (RGB) when you should have been using a float4 vector (RGBA) or vice versa. Without an image from your material that’s all I can say.

I have the exact same issue so i thought replying here might help :slight_smile:

Here is a screenshot of the material i’m creating:

Hi, the Height input needs to be a single float value (so greyscale), and not an float4. [HR][/HR]
I think you wanted to plug in the A channel instead of RGBA. Further normal maps don’t have an alpha channel, so you would use the Alpha channel (the A) from the diffuse texture (so from the two textures above the normal textures in you’re image).

Further using the A channel only makes sense, if you’re textures actually have an alpha channel (so you might wanna check that the two diffuse textures you’re using have an alpha channel).

Hey thanks for the reply!

Yes it seems using the A channel rather than RGBA fixed the issue. :slight_smile: It’s just the guide i was looking at suggested using RGBA, but it seems it was done on an older UE version and they compute differently now. :slight_smile: