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
Flakky
(Alexander Blintsov)
May 18, 2016, 9:08am
2
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…
Flakky
(Alexander Blintsov)
May 18, 2016, 9:17am
3
@ 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.
http://s1.uploadpics.ru/images/-yqBgKkCGb.png
Nonlin
(Nonlin)
January 24, 2018, 3:27pm
4
Flakky:
@ 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.
http://s1.uploadpics.ru/images/-yqBgKkCGb.png
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.
Deathrey
(DeathreyCG)
January 24, 2018, 3:38pm
5
It should be In.Sample in your case