When a "Float to UInt" Expression is used in a Material Graph with a valid direct input connection that fails to evaluate, function UMaterialExpressionFloatToUInt::Compile() does not catch the input value coming in as INDEX_NONE and calls Compiler->GetParameterType(Value), which triggers a check() inside FHLSLMaterialTranslator::GetParameterType().
Note that UMaterialExpressionFloatToUInt and UMaterialExpressionUIntToFloat were added by CL 36082440, and both had this issue initially. However, the latter was fixed by CL 42134636, while the former remained vulnerable.
Repros since at least UE 5.5 up to latest.
1. Create a new Material
2. Build graph: "If" --> "Float to UInt" --> "TextureObjectFromCollection" --> "TextureSample" --> Attribute "Base Color"
--> check() fails on FHLSLMaterialTranslator::GetParameterType() called from UMaterialExpressionFloatToUInt::Compile()
FHLSLMaterialTranslator::GetParameterType(int Index) Line 4130
UMaterialExpressionFloatToUInt::Compile(FMaterialCompiler * Compiler, int OutputIndex) Line 7636
FHLSLMaterialTranslator::CallExpression(FMaterialExpressionKey ExpressionKey, FMaterialCompiler * Compiler) Line 4528
FExpressionInput::Compile(FMaterialCompiler * Compiler) Line 384
(...)
FHLSLMaterialTranslator::TranslateMaterial() Line 1501
FHLSLMaterialTranslator::Translate(bool bForceDisableDDCQuery) Line 1229
FMaterial::Translate_Legacy(const FMaterialShaderMapId & ShaderMapId, const FStaticParameterSet & InStaticParameters, const ITargetPlatform * InTargetPlatform, FMaterialCompilationOutput & OutCompilationOutput, TRefCountPtr<FSharedShaderCompilerEnvironment> & OutMaterialEnvironment) Line 3505
FMaterial::Translate(const FMaterialShaderMapId & InShaderMapId, const FStaticParameterSet & InStaticParameters, const ITargetPlatform * InTargetPlatform, FMaterialCompilationOutput & OutCompilationOutput, TRefCountPtr<FSharedShaderCompilerEnvironment> & OutMaterialEnvironment) Line 3657
FMaterial::BeginCompileShaderMap(const FMaterialShaderMapId & ShaderMapId, const FStaticParameterSet & StaticParameterSet, EMaterialShaderPrecompileMode PrecompileMode, const ITargetPlatform * TargetPlatform) Line 3686
(...)
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-369540 in the post.
| 0 |
| Component | UE - Rendering - Architecture - Materials |
|---|---|
| Affects Versions | 5.4.1, 5.5 |
| Created | Mar 11, 2026 |
|---|---|
| Updated | May 28, 2026 |