Skip to content

Commit 11eeacd

Browse files
kennytannEvergreen
authored andcommitted
[Port] [2022.3] [UUM-105392] Fix hdr encoding and postprocess resolve for rendergraph 2d
1 parent d07856c commit 11eeacd

File tree

1 file changed

+2
-1
lines changed
  • Packages/com.unity.render-pipelines.universal/Runtime/2D

1 file changed

+2
-1
lines changed

Packages/com.unity.render-pipelines.universal/Runtime/2D/Renderer2D.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re
390390
bool pixelPerfectCameraEnabled = ppc != null && ppc.enabled;
391391
bool hasCaptureActions = cameraData.captureActions != null && lastCameraInStack;
392392
bool resolvePostProcessingToCameraTarget = lastCameraInStack && !hasCaptureActions && !hasPassesAfterPostProcessing && !requireFinalPostProcessPass && !pixelPerfectCameraEnabled;
393+
bool doSRGBEncoding = resolvePostProcessingToCameraTarget && needsColorEncoding;
393394

394395
if (hasPostProcess)
395396
{
@@ -404,7 +405,7 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re
404405
colorGradingLutHandle,
405406
null,
406407
requireFinalPostProcessPass,
407-
afterPostProcessColorHandle.nameID == k_CameraTarget.nameID && needsColorEncoding);
408+
doSRGBEncoding);
408409

409410
EnqueuePass(postProcessPass);
410411
}

0 commit comments

Comments
 (0)