Skip to content

Commit 504557e

Browse files
Fixed a regression in the transparent SSR color pyramid usage. (#6001)
* Fixed a regression in the transparent SSR color pyramid usage. * Update CHANGELOG.md Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
1 parent b8c4896 commit 504557e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,9 @@ TextureHandle RenderSSR(RenderGraph renderGraph,
11231123
BuildCoarseStencilAndResolveIfNeeded(renderGraph, hdCamera, resolveOnly: true, ref prepassOutput);
11241124
}
11251125

1126-
RTHandle colorPyramidRT = transparent ? hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain) : hdCamera.GetPreviousFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain);
1126+
// The first color pyramid of the frame is generated after the SSR transparent, so we have no choice but to use the previous
1127+
// frame color pyramid (that includes transparents from the previous frame).
1128+
RTHandle colorPyramidRT = hdCamera.GetPreviousFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain);
11271129
if (colorPyramidRT == null)
11281130
return renderGraph.defaultResources.blackTextureXR;
11291131

0 commit comments

Comments
 (0)