Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit d62f507

Browse files
committed
Fixed flip bug in SRPs
1 parent 2839c8a commit d62f507

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

PostProcessing/Runtime/PostProcessLayer.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,13 +669,18 @@ int RenderBuiltins(PostProcessRenderContext context, bool isFinalPass, int relea
669669
if (!breakBeforeColorGrading)
670670
RenderEffect<ColorGrading>(context);
671671

672+
int pass = 0;
673+
672674
if (isFinalPass)
673675
{
674676
uberSheet.EnableKeyword("FINALPASS");
675677
dithering.Render(context);
678+
679+
if (context.flip && !context.isSceneView)
680+
pass = 1;
676681
}
677682

678-
cmd.BlitFullscreenTriangle(context.source, context.destination, uberSheet, 0);
683+
cmd.BlitFullscreenTriangle(context.source, context.destination, uberSheet, pass);
679684

680685
context.source = context.destination;
681686
context.destination = finalDestination;

PostProcessing/Shaders/Builtins/Uber.shader

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,5 +234,15 @@ Shader "Hidden/PostProcessing/Uber"
234234

235235
ENDHLSL
236236
}
237+
238+
Pass
239+
{
240+
HLSLPROGRAM
241+
242+
#pragma vertex VertDefaultNoFlip
243+
#pragma fragment FragUber
244+
245+
ENDHLSL
246+
}
237247
}
238248
}

0 commit comments

Comments
 (0)