# Pass texture array to shader

**URL:** <https://forums.unrealengine.com/t/pass-texture-array-to-shader/1203989>\
**Category:** Programming & Scripting\
**Tags:** compiling-shaders, unreal-engine, hlsl, shader, question\
**Created:** [June 19, 2023, 11:09am UTC](https://forums.unrealengine.com/t/pass-texture-array-to-shader/1203989 "2023-06-19T11:09:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_data](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alex\_data](https://forums.unrealengine.com/u/Alex_data)\
**Post date:** [June 19, 2023, 11:09am UTC](https://forums.unrealengine.com/t/pass-texture-array-to-shader/1203989/1 "2023-06-19T11:09:51Z")

</div>

Hi, I’m working on compute shader and try to pass a texture array to hlsl, what i’ve done is something like:

```auto
//shader parameters defined in Sub FGlobalShader class
SHADER_USE_PARAMETER_STRUCT(FMyStruct, FGlobalShader)
	BEGIN_SHADER_PARAMETER_STRUCT(FParameters,)
        SHADER_PARAMETER_ARRAY(FMatrix, Transforms, [10])
        SHADER_PARAMETER_RDG_TEXTURE_ARRAY(Texture2D, Textures, [10])
        SHADER_PARAMETER_SAMPLER(SamplerState, SceneTextureSampler)
	END_SHADER_PARAMETER_STRUCT()

```

and in .usf:

```auto
Texture2D<float4> Textures[10];
float4x4 Transforms[10];

```

But it can’t complete the compile with an error shown:

```auto
permutation 0 has unbound parameters not represented in the parameter struct:
  Textures[0]
  Textures[1]

```

So i dive in to engine source and see how they use them, it shows like that:

```auto
Texture2D<float4> Textures_0;
Texture2D<float4> Textures_1;

```

I’ve tried and it works fine, so my question is why `float4x4 Transforms[10];` is acceptable but for texture is not? and the syntax of `Textures_0` is a little strange, any theories?  
My engine version is 4.27.2, dx11.
