Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fix precise fresnel for delta lights for SVBRDF in AxF.
- Fixed the debug exposure mode for display sky reflection and debug view baked lighting
- Fixed MSAA depth resolve when there is no motion vectors
- Fixed culling of planar reflection probes that change position (case 1218651)

### Changed
- Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ internal HDProbeCullState PrepareCull(Camera camera)
if (m_PlanarProbeCullingGroup == null)
return default;

RemoveDestroyedProbes(m_PlanarProbes, m_PlanarProbeBounds, ref m_PlanarProbeCount);
UpdateBoundsAndRemoveDestroyedProbes(m_PlanarProbes, m_PlanarProbeBounds, ref m_PlanarProbeCount);

m_PlanarProbeCullingGroup.targetCamera = camera;
m_PlanarProbeCullingGroup.SetBoundingSpheres(m_PlanarProbeBounds);
Expand Down Expand Up @@ -286,7 +286,7 @@ static void RemoveDestroyedProbes(List<HDProbe> probes)
}
}

static void RemoveDestroyedProbes(PlanarReflectionProbe[] probes, BoundingSphere[] bounds, ref int count)
static void UpdateBoundsAndRemoveDestroyedProbes(PlanarReflectionProbe[] probes, BoundingSphere[] bounds, ref int count)
{
for (int i = 0; i < count; ++i)
{
Expand All @@ -297,6 +297,11 @@ static void RemoveDestroyedProbes(PlanarReflectionProbe[] probes, BoundingSphere
probes[count - 1] = null;
--count;
}

if (probes[i])
{
bounds[i] = probes[i].boundingSphere;
}
}
}

Expand Down