Description

Material Functions cannot output Texture Objects or Booleans.

This seems to be because the Material Editor believes that the outputs are Floats, and forbid connections to inputs that take Textures or Bools, while allowing non-compiling connections to inputs that take a Float.

Also tested on //UE5/Release-5.5, CL: 36410558

Steps to Reproduce

1. Download the attached test project and open
2. Open the Material "/Game/M_Test"
3. Observe the Material Function "MF_IOTextureTest" is a passthrough for the four texture types it uses (Texture2D, TextureCube, Texture2DArray, VolumeTexture)
4. Observe the Material Editor will not let you connect the outputs of the Material Function "MF_IOTextureTest" to the "Tex" input on a Texture Sample Expression, with the Tooltip saying "Float is not compatible with Texture"
5. Observe the Material Editor will allow you to connect the outputs of the Material Function "MF_IOTextureTest" to the "UVs" input on a Texture Sample Expression, but this creates the compile error "Cannot cast between non-numeric types texture2D and float2." The compile error is expected, but the ability to connect is not.
6. Observe the MF_IOBooleanTest Material Function is a passthrough for the "Bool" type
7. Observe that you cannot connect the output of the Material Function "MF_IOBooleanTest" to the "Apply View MipBias" input on a Texture Sample Expression, with the Tooltip saying "Float is not compatible with Bool"

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-226057 in the post.

0
Login to Vote

Backlogged
CreatedSep 30, 2024
UpdatedOct 3, 2024
View Jira Issue