TexSampler Unidentified

float4 color;

color = Texture2DSample(ScreenS, TexSampler, UV);
color *= length(newBeam);
color.a = 1.0f;
return color;

Yes, I have a Texture Object going into ScreenS input. I have data going into the UV. I have data going into newBeam but I keep getting:

Error [SM5] error X3004: undeclared identifier ‘TexSampler’

I have tried this in multiple projects in custom nodes with different textures and the result is always the same. I am using 4.10.1

Looks like they removed it in latest versions (More likely just renamed it).

I ran into this problem as well. Moreover, Epic still have this “TexSampler” in their documentation, wich really confusing…

@ I searched inside HLSL code viewer for those samplers and found, that they use “Material.Texture2D_0Sampler” instead of simple TexSample. Tried ad it works.


Hey so in doing that change I get the error

[SM5] /Engine/Generated/Material.ush(1276,15-67): error X3017: ‘Texture2DSample’: cannot implicitly convert from ‘float3’ to ‘Texture2D<float4>’

What is the fix for that?

For refrence, this is just with taking their example and making your suggested change.

It should be In.Sample in your case