x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

Product Version: UE 4.18
Tags:
more ▼

asked Jan 24 '18 at 02:06 AM in Everything Else

avatar image

Nonlin
104 7 17 18

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

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.

more ▼

answered Jan 24 '18 at 03:48 PM

avatar image

Deathrey
7.7k 129 29 289

(comments are locked)
10|2000 characters needed characters left

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

more ▼

answered Jan 24 '18 at 06:53 PM

avatar image

Nonlin
104 7 17 18

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question