Materials containing a cube array texture sampling node will not compile when hardware ray tracing is enabled. The shader compilation error indicates that an invalid op code was used: "Opcode Sample not valid in shader model lib_6_6(closesthit)"
[SM6] Shader debug info dumped to: “d:\p4\main\projects\ProjectName\UnrealEngine\ProjectName\Saved\ShaderDebugInfo\PCD3D_SM6\M_SpeedTunnel_Cubemap_Particle_492b22692a8dfd\Default\FLocalVertexFactory\TMaterialCHSFNoLightMapPolicyFAnyHitShader\0”
d:\p4\main\projects\ProjectName\UnrealEngine\Engine\Shaders\Private\RayTracing\RayTracingMaterialHitShaders.usf(0): Shader TMaterialCHSFNoLightMapPolicyFAnyHitShader, Permutation 0, VF FLocalVertexFactory:
error: validation errors
[SM6] d:\p4\main\projects\ProjectName\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\ProjectName\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\ProjectName\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.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-263190 in the post.
0 |
Component | UE - Graphics Features - Ray Tracing |
---|---|
Affects Versions | 5.5.4 |
Target Fix | 5.7 |
Created | Mar 31, 2025 |
---|---|
Updated | Apr 3, 2025 |