Unreal HLSL Custom Material Node TexSampler No longer valid?

Every guide I follow for HLSL custom nodes in Unreal does something where they have a Tex variable and then they call TexSampler but they never have TexSampler explicitly made as an input pin, from what I can gather it should work because Tex exists.

However, Unreal keeps giving me this error [SM5] /Engine/Generated/Material.ush(1297,38-47): error X3004: undeclared identifier ‘TexSampler’.

Can anyone tell me what I’m doing wrong and how to solve it?

You can use Tex.Sample these days. Sampler state TexSampler will be there automatically. If your texture input name is Tex, samplerstate name will be TexSampler.

Turns out the answer is “Material.Texture2D_0Sampler” but I also confused Texture Sampler with Texture Object.