# \[UE5, Bug Report\] HLSL 'TexSampler' undefined if a parameter name does not equal Tex

**URL:** <https://forums.unrealengine.com/t/ue5-bug-report-hlsl-texsampler-undefined-if-a-parameter-name-does-not-equal-tex/1257471>\
**Category:** Programming & Scripting\
**Tags:** compiling-shaders, unreal-engine, Engine-Source-Code, bug-report, editor, Rendering, shader, question, Blueprint\
**Created:** [August 11, 2023, 4:48am UTC](https://forums.unrealengine.com/t/ue5-bug-report-hlsl-texsampler-undefined-if-a-parameter-name-does-not-equal-tex/1257471 "2023-08-11T04:48:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [August 11, 2023, 4:48am UTC](https://forums.unrealengine.com/t/ue5-bug-report-hlsl-texsampler-undefined-if-a-parameter-name-does-not-equal-tex/1257471/1 "2023-08-11T04:48:44Z")

</div>

I suppose this is a bug, documentation is lacking and already wasting time.

> [Custom Material Expressions in Unreal Engine | Unreal Engine 5.2 Documentation](https://docs.unrealengine.com/5.2/en-US/custom-material-expressions-in-unreal-engine/)

Setup:

 ![afbeelding](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/2/7d2e60a73654fca2322cc11aee5c9c6f9b62a8fc.png)

![afbeelding](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/3/d/33dc54bd5359d15555b9714ce9e37231b6f9996f.png)

You will get the following error:

 ![afbeelding](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/3/9/839acaaad52dfa4064f0542027f2e931e979989e.png)

For whatever reason you must have a parameter named EXACTLY “Tex”, not MyTex or an actual descriptive parameter name. The texture object parameter must be named Tex. Otherwise the error appears. It’s unclear where those “magic” beings as TexSampler are declared and why. If they are automatically generated then why do I have to pass it on as an argument? How can I be aware of the existence of any method / variable if I can only write my code in this miniature text area -\_-?

Is there an intellisense way of doing things? So that I actually can figure out what I am allowed to write there and why?
