Material compile error [SM5]

Hello!

In UE 4.12 I have two errors when I try to compile material like in picture.

Error [SM5] Material.usf(1564,118): error X3004: undeclared identifier ‘Local0’

Error [SM5] Material.usf(1564,53): error X3013: ‘Texture2DSample’: function does not take 3 parameters

To work around the problem you must remove TexCoord node or add TexCoord node for each texture

or make LERP alpha value not zero

or convert LERP alpha constant to parameter.

Sorry for my bad english.

Connecting directly to the normal vector also fixes the problem.

Instead of flattening the normal like that, try the " Flatten normal" node available :slight_smile:

With FlattenNormal I also have a problem but when Flatness = 1 (FlattenNormal is LERP with blue color and nothing more):

This is only a demonstration to reproduce the error.

In a real project I have a shader where this error occurs as a consequence of the optimization calculations for certain values of the input data (like landscape layer weights).

Try placing a single Texture Coordinate for each of the Texture samples.

Yes, this is one of the workarounds. I wrote about this in my question.

Hey Igor,

I have gone ahead and entered a bug report for this issue, UE-31792. Once the issue has been addressed by our engineers it will be added to a our known issues for an upcoming full engine release or hotfix.

Let me know if you have further questions or need additional assistance.

Thank you,

Thank you!