Quick answer: HDRP only inserts renderers into the ray tracing acceleration structure when the object’s layer is in the Ray Tracing Settings Layer Mask, the renderer has Ray Tracing enabled, and the material uses a shader that emits a ray intersection variant. Missing any one of those and the mesh is invisible to reflections, shadows, and GI.

When HDRP ray tracing “sometimes works,” the answer is almost always the acceleration structure. The RTAS (ray tracing acceleration structure) is rebuilt every frame from a filtered subset of your scene. The filter runs on layers, flags, and shader support, and each one can silently exclude a mesh. If a particular chair does not cast a ray traced shadow while the one next to it does, work through the filter in order.

Look at the Ray Tracing Settings override

Ray tracing in HDRP is driven by a Volume override named Ray Tracing Settings. Open your scene’s main Volume Profile and add it if it is missing. The Layer Mask field is the first gate. A renderer whose GameObject is on a layer not included here never makes it into the RTAS. Developers often set this to a single layer like Default for performance and then forget that all their imported props are on Environment or Props.

Tighten or loosen the mask depending on your target hardware. Including everything is fine for a small scene; for large worlds you want only layers that contribute visible reflections.

Enable ray tracing on the renderer itself

Every MeshRenderer and SkinnedMeshRenderer has a Ray Tracing block in the Inspector. You need to check the Ray Tracing checkbox and pick a Ray Tracing Mode. Use Static for non-moving meshes so HDRP reuses the bottom-level structure across frames, and Dynamic Geometry for anything that animates, morphs, or is a skinned mesh. Dynamic Transform is the middle ground: the mesh does not deform but the transform changes, so only the TLAS entry is updated.

using UnityEngine.Rendering.HighDefinition;

var renderer = crate.GetComponent<MeshRenderer>();
renderer.rayTracingMode = UnityEngine.Experimental.Rendering.RayTracingMode.Static;
renderer.enabled = true;

If the field is disabled entirely, the mesh is an edge case HDRP cannot handle — typically a procedural mesh created at runtime with no upload path, or a mesh flagged as read-only without CPU access.

Audit the shader

Ray intersection requires a shader variant that HDRP calls for every ray hit. HDRP Lit, Lit Tessellation, Eye, Hair, and Fabric all provide one. Custom shaders written in raw HLSL usually do not, unless they opt in with the Raytracing Shader Pass. Shader Graph materials need their target set to HDRP and the Ray Tracing toggle checked in the graph settings.

Signs your shader is unsupported: the mesh appears in raster but is black or pink in RT reflections, or it simply does not show up at all. Switch temporarily to a plain HDRP Lit material and see if the problem disappears.

Procedural and GPU-generated geometry

Meshes constructed with Graphics.DrawMeshInstancedIndirect, compute-shader output, or VFX Graph do not participate in the RTAS by default. HDRP has a specific entry point — HDRenderPipeline.AddRayTracingInstance — that advanced users can call, but for most projects the fix is to switch to regular MeshRenderers backed by the generated mesh. Expect procedural foliage and particle-driven debris to be missing from reflections unless you handle them explicitly.

Validate with the RenderGraph viewer

Window -> Analysis -> Render Graph Viewer shows the frame’s passes including Build Acceleration Structure. Click it and inspect which renderers were added. If your suspect mesh is not listed, you already know the filter rejected it. Cross-reference with the Frame Debugger to see whether it was the layer mask, the ray tracing flag, or the shader pass.

“An acceleration structure only contains what you told it to. If the mesh looks wrong in the ray traced pass, first ask whether it is in the structure at all.”

Related Issues

For related lighting debugging, see Fix Unity light probe flickering on moving objects. If you are debugging depth-based effects where shader passes matter, Fix Godot shader depth buffer access flipped walks through a similar filtered-pipeline issue in another engine.

Tip: toggle Ray Tracing off and back on in the Volume to force the RTAS to rebuild — sometimes it gets out of sync after a script reload.