Skip to content

Commit ed28ac1

Browse files
FrancescoC-unityalelievr
authored andcommitted
Don't blur if nothing to blur (saves memory due to RG) (#6183)
1 parent 49a5acd commit ed28ac1

File tree

1 file changed

+5
-0
lines changed
  • com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow

1 file changed

+5
-0
lines changed

com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAtlas.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,11 @@ TextureHandle IMBlurMoment(RenderGraph renderGraph, TextureHandle atlasTexture)
566566

567567
internal TextureHandle BlurShadows(RenderGraph renderGraph)
568568
{
569+
if (m_ShadowRequests.Count == 0)
570+
{
571+
return renderGraph.defaultResources.whiteTexture;
572+
}
573+
569574
if (m_BlurAlgorithm == BlurAlgorithm.EVSM)
570575
{
571576
return EVSMBlurMoments(renderGraph, m_ShadowMapOutput);

0 commit comments

Comments
 (0)