# \[SM6\] Shader error when using Texture Cube Array in UE 5.5

**URL:** <https://forums.unrealengine.com/t/sm6-shader-error-when-using-texture-cube-array-in-ue-5-5/2417920>\
**Category:** Rendering\
**Tags:** unreal-engine, bug-report, question\
**Created:** [March 26, 2025, 3:00am UTC](https://forums.unrealengine.com/t/sm6-shader-error-when-using-texture-cube-array-in-ue-5-5/2417920 "2025-03-26T03:00:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PChan\_Tuatara](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PChan\_Tuatara](https://forums.unrealengine.com/u/PChan_Tuatara)\
**Post date:** [March 26, 2025, 3:00am UTC](https://forums.unrealengine.com/t/sm6-shader-error-when-using-texture-cube-array-in-ue-5-5/2417920/1 "2025-03-26T03:00:43Z")

</div>

Hello there, first time posting here.

For context. this shader was tested on UE 5.3, but I get this error when hooking up a Texture Cube Array in 5.5

Any tips would be appreciated!

This is the error message.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/7/6275d67e55abd5fc74562557f60b7a50d1b50008.png)

[SM6] Shader debug info dumped to: “d:\p4\main\projects\TagFighter\UnrealEngine\TagFighter\Saved\ShaderDebugInfo\PCD3D\_SM6\M\_SpeedTunnel\_Cubemap\_Particle\_492b22692a8dfd\Default\FLocalVertexFactory\TMaterialCHSFNoLightMapPolicyFAnyHitShader\0”  
d:\p4\main\projects\TagFighter\UnrealEngine\Engine\Shaders\Private\RayTracing\RayTracingMaterialHitShaders.usf(0): Shader TMaterialCHSFNoLightMapPolicyFAnyHitShader, Permutation 0, VF FLocalVertexFactory:  
error: validation errors  
[SM6] d:\p4\main\projects\TagFighter\UnrealEngine\Engine\Binaries\Win64\RayTracingMaterialHitShaders.dxil(2816,9): Shader TMaterialCHSFNoLightMapPolicyFAnyHitShader, Permutation 0, VF FLocalVertexFactory:  
RayTracingMaterialHitShaders.dxil:2816:9: error: Opcode Sample not valid in shader model lib\_6\_6(closesthit).  
[SM6] d:\p4\main\projects\TagFighter\UnrealEngine\Engine\Shaders\Private\RayTracing\RayTracingMaterialHitShaders.usf(0): Shader TMaterialCHSFNoLightMapPolicyFAnyHitShader, Permutation 0, VF FLocalVertexFactory:  
RayTracingMaterialHitShaders.dxil:5257: error: Entry function performs some operation that is incompatible with the shader stage or other entry properties. See other errors for details.  
[SM6] d:\p4\main\projects\TagFighter\UnrealEngine\Engine\Shaders\Private\RayTracing\RayTracingMaterialHitShaders.usf(0): Shader TMaterialCHSFNoLightMapPolicyFAnyHitShader, Permutation 0, VF FLocalVertexFactory:  
RayTracingMaterialHitShaders.dxil:5257: error: Function uses features incompatible with the shader stage (closesthit) of the entry function.

---

<div class="post-metadata">

**Author:** ![LucasChen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LucasChen](https://forums.unrealengine.com/u/LucasChen)\
**Post date:** [November 26, 2025, 2:56pm UTC](https://forums.unrealengine.com/t/sm6-shader-error-when-using-texture-cube-array-in-ue-5-5/2417920/2 "2025-11-26T14:56:43Z")

</div>

It seems to be a bug in UE shader.

Open file “\Shaders\Engine\Private\Common.ush” and modify the TextureCubeArraySample function from

```cpp
MaterialFloat4 TextureCubeArraySample(TextureCubeArray Tex, SamplerState Sampler, float4 UV)
{
	return Tex.Sample(Sampler, UV);
}

```

to

```cpp
MaterialFloat4 TextureCubeArraySample(TextureCubeArray Tex, SamplerState Sampler, float4 UV)
{
#if USE_FORCE_TEXTURE_MIP
	return Tex.SampleLevel(Sampler, UV, 0);
#else
	return Tex.Sample(Sampler, UV);
#endif
}

```

and restart the UE editor.

BTW, it seems that UE do not accept external issues or pull requests. Does anyone know how I can feed back this bug to the official?

---

<div class="post-metadata">

**Author:** ![S-ed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/s-ed/32/1194558_2.png) [@S-ed](https://forums.unrealengine.com/u/S-ed)\
**Post date:** [March 16, 2026, 6:53pm UTC](https://forums.unrealengine.com/t/sm6-shader-error-when-using-texture-cube-array-in-ue-5-5/2417920/3 "2026-03-16T18:53:44Z")

</div>

I believe it’s this one?  
[https://issues.unrealengine.com/issue/UE-263190](https://issues.unrealengine.com/issue/UE-263190)

Use **`Help → Report a Bug`** from the Engine

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/f/1/5f14571cef06c27343deb4ce6e2d72a1d85fee88.png)

---

<div class="post-metadata">

**Author:** ![LucasChen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LucasChen](https://forums.unrealengine.com/u/LucasChen)\
**Post date:** [May 22, 2026, 9:46am UTC](https://forums.unrealengine.com/t/sm6-shader-error-when-using-texture-cube-array-in-ue-5-5/2417920/6 "2026-05-22T09:46:18Z")

</div>

Thanks!

The link is exactly this bug but left ignored for many years. I am an UE5 enginer working for a game company and I found&fix a lot of bugs(functional bugs/render artifacts/etc.) in its C++/shader source code, which really needs fixing for other users. Your epic homepage shows that you once submitted a pull request to the repo. Could you pls tell me how to do that?
