Error: use of undeclared identifier 'SceneTextureLookup'; did you mean 'MobileSceneTextureLookup'?

I get this while building for iOS with a material that has a custom node that contains 'SceneTextureLookup.; However, when I replace that with MobileSceneTextureLookup, I get this when I try to build:

“Error: no matching function for call to ‘MobileSceneTextureLookup’”

What am I doing wrong here?

I have learned my folly! The issue is that MobileSceneTextureLookup needs its parameters added a different way than SceneTextureLookup. So a line like this:

float3 tex = SceneTextureLookup(uvShifted, TexIndex, false);

Needs to be changed to this for mobile:

float4 tex = MobileSceneTextureLookup(Parameters, TexIndex, uvShifted);

Yes, that “Parameters” is literally the word “Parameters.” It surprised me as well. But now it works in iOS preview in the editor, though not 1:1 on an iDevice. I had to greatly exaggerate some other values to get it to look right on a device.

I get the same compiler error in an iOS build:

Error: UAT: /Engine/Generated/Material.ush:3424:19: error: use of undeclared identifier ‘SceneTextureLookup’; did you mean ‘MobileSceneTextureLookup’?

But I am using Blueprints and not C++, where can I still fix this error?

1 Like