Skip to content

Instantly share code, notes, and snippets.

@doctorpangloss
Created July 16, 2022 00:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doctorpangloss/41fa85298a1026540c8e60942d452c29 to your computer and use it in GitHub Desktop.
Save doctorpangloss/41fa85298a1026540c8e60942d452c29 to your computer and use it in GitHub Desktop.
patch for hdrp reflection probe culling issue
diff --git a/Packages/com.unity.render-pipelines.high-definition@12.1.7/Runtime/RenderPipeline/HDRenderPipeline.cs b/Packages/com.unity.render-pipelines.high-definition@12.1.7/Runtime/RenderPipeline/HDRenderPipeline.cs
index 34918678..6997fe2e 100644
--- a/Packages/com.unity.render-pipelines.high-definition@12.1.7/Runtime/RenderPipeline/HDRenderPipeline.cs
+++ b/Packages/com.unity.render-pipelines.high-definition@12.1.7/Runtime/RenderPipeline/HDRenderPipeline.cs
@@ -1334,6 +1334,14 @@ namespace UnityEngine.Rendering.HighDefinition
hdCamera.RequestDynamicResolution(cameraRequestedDynamicRes, dynResHandler);
+ // Force add all the HDProbes
+ var allProbes = GameObject.FindObjectsOfType<HDProbe>();
+ cullingResults.hdProbeCullingResults.Reset();
+ foreach (var probe in allProbes)
+ {
+ cullingResults.hdProbeCullingResults.AddProbe(probe);
+ }
+
// Add render request
var request = new RenderRequest
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment