HDRP+DXR Error

I am using Unity Editor version 2021.3.18f1c1 LTS, and when I initialize a new project using the “3D (HDRP)” template, change the configuration checking to “HDRP+DXR” in the HDRP wizard, click “Fix all”, then restart the editor as needed, tons of error and warning messages start to pop out, as shown in the image attached. Any clues on how to fix this? Thanks in advance.

BTW, this happens every time I open an HDRP project, but all warning and errors disappear once the play button is hit.

Warning msg:

XRSystem.ReleaseFrame() was not called!
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Error msg:

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.UpdateShaderVariablesRaytracingCB (UnityEngine.Rendering.HighDefinition.HDCamera hdCamera, UnityEngine.Rendering.CommandBuffer cmd) (at Library/PackageCache/com.unity.render-pipelines.high-definition@12.1.10/Runtime/RenderPipeline/HDRenderPipeline.cs:969)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.UpdateGlobalConstantBuffers (UnityEngine.Rendering.HighDefinition.HDCamera hdCamera, UnityEngine.Rendering.CommandBuffer cmd) (at Library/PackageCache/com.unity.render-pipelines.high-definition@12.1.10/Runtime/RenderPipeline/HDRenderPipeline.cs:879)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.ExecuteRenderRequest (UnityEngine.Rendering.HighDefinition.HDRenderPipeline+RenderRequest renderRequest, UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.HighDefinition.AOVRequestData aovRequest) (at Library/PackageCache/com.unity.render-pipelines.high-definition@12.1.10/Runtime/RenderPipeline/HDRenderPipeline.cs:2141)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) (at Library/PackageCache/com.unity.render-pipelines.high-definition@12.1.10/Runtime/RenderPipeline/HDRenderPipeline.cs:1915)
UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at <9cee040413ce4cfa938d7d158dcb20b8>:0)
UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, System.Collections.Generic.List`1[T] renderRequests, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at <9cee040413ce4cfa938d7d158dcb20b8>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)


I do not recommend using Unity 2021 if you want to use DXR. Both DX12 and Ray Tracing were experimental in that release, and have both gotten many stability, performance and feature improvements since then.

DX12 has left experimental in 2022.2
Ray Tracing has left experimental in 2023.1

Your issue sounds similar to this issue , which was caused by the old HDRaytracingManager which was slow and prone to bugs. It has been entirely replaced with the new CullInstances API introduced in 2022.1

Of course, if you really need to use 2021.1, you can always submit a bug report.

2 Likes

Got that! Thank you very much for your reply!