# Receiving error in Material after enabling Ray Tracing

**URL:** <https://forums.unrealengine.com/t/receiving-error-in-material-after-enabling-ray-tracing/485148>\
**Category:** Rendering\
**Tags:** Raytracing, unreal-engine, question\
**Created:** [June 21, 2021, 8:46am UTC](https://forums.unrealengine.com/t/receiving-error-in-material-after-enabling-ray-tracing/485148 "2021-06-21T08:46:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guardian101](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Guardian101](https://forums.unrealengine.com/u/Guardian101)\
**Post date:** [June 21, 2021, 8:46am UTC](https://forums.unrealengine.com/t/receiving-error-in-material-after-enabling-ray-tracing/485148/1 "2021-06-21T08:46:50Z")

</div>

Hi, I’m receiving the following error message in a material which was previously working before I turned on Raytracing. I know I could just turn it off again, but I would quite like to build this function set to support Raytracing, as I am intending to sell it on the marketplace. This is the error:

[SM5] error: validation errors

[SM5] error: /Engine/Private/GemoetryCacheVertexFactory.ush:437:75 @[/Engine/Private/RayTracingMaterialHitShaders.usf:234:18 @[ /Engine/Private/RayTracingMaterialHitShaders.usf:288:2] ]: at ‘%252 = fmul fast float %233, undef’ in block ‘#7’ of function ‘\*A?MaterialCHS@@YAXUFPackedMaterialClosestHitPayload@@UFDefaultAttributes@@@Z’ : Instructions should not read uninitialized value

[SM5] Validation failed

[SM5] D3DCompileToDxil failed

[SM5] error: /Engine/Private/GemoetryCacheVertexFactory.ush:437:75 @[/Engine/Private/RayTracingMaterialHitShaders.usf:234:18 @[ /Engine/Private/RayTracingMaterialHitShaders.usf:288:2] ]: at ‘%252 = fmul fast float %233, undef’ in block ‘#7’ of function ‘\*A?MaterialCHS@@YAXUFPackedMaterialClosestHitPayload@@UFDefaultAttributes@@@Z’ : Instructions should not read uninitialized value

\*A Not Sure what this symbol is, but it shows an A inside a box.

I also wondered, I only have a GeForce 1060 at the moment, which obviously doesn’t actually have raytracing hardware, but if I’m trying to develop tools that will also support ray tracing (since I am desperate to upgrade my graphics card and want the system I’m developing to be future proof), am I right in assuming that it will just be done by the processor in the absence of dedicated hardware and run way slower, or could this actually be causing the error to occur. Thanks a lot for any help you can offer.

---

<div class="post-metadata">

**Author:** ![Deathrey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deathrey](https://forums.unrealengine.com/u/Deathrey)\
**Post date:** [June 22, 2021, 11:01am UTC](https://forums.unrealengine.com/t/receiving-error-in-material-after-enabling-ray-tracing/485148/2 "2021-06-22T11:01:44Z")

</div>

Long story short, something in your material is trying to do something, that is not available in raytracing shader.

There is a switch material expression, that switches between raytracing and normal shader, pretty sure you can find and use it isolate your monstrous material function.

---

<div class="post-metadata">

**Author:** ![Guardian101](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Guardian101](https://forums.unrealengine.com/u/Guardian101)\
**Post date:** [January 19, 2026, 3:02pm UTC](https://forums.unrealengine.com/t/receiving-error-in-material-after-enabling-ray-tracing/485148/3 "2026-01-19T15:02:34Z")

</div>

Actually I just had to put the centerpoint to 0 for the displacement. Apparently negative displacement causes the whole scene to turn black when Nanite is enabled, ROFL 🙂
