Using Material Attributes as an input to a Custom Expression causes the HLSL Translator to create multiple CustomExpression# functions, for each used member of the Material Attributes, rather than using FMaterialAttributes.
1. Download the Licensee's test project and open
https://udn.unrealengine.com/s/contentdocument/069QP00000DU3qdYAD
2. Open the asset /Game/M_Test.
3. Observe the material compilation errors.
4. Observe that the first two parameters to the Custom expression are from MakeMaterialAttributes expressions.
5. From the HLSL Code window, copy out the code to somewhere you can perform a string search.
6. Search for the declaration of CustomExpression0(...).
7. Observe that the second and third parameters are MaterialFloat3, not FMaterialAttributes.
8. In the material, connect the red component of each constant color to the Metallic input of the MakeMaterialAttributes expression.
9. Observe the number of errors doubles.
10. Repeat steps 5 and 6
11. Observe that there are now two different declarations of CustomExpression#, one that uses a MaterialFloat3, one with MaterialFloat.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-219363 in the post.
1 |
Component | UE - Rendering Architecture - Materials |
---|---|
Affects Versions | 5.4, 5.4.2 |
Created | Jul 15, 2024 |
---|---|
Resolved | Jul 22, 2024 |
Updated | Jul 22, 2024 |