Skip to content

Commit d30e7c4

Browse files
thomas-zengEvergreen
authored andcommitted
[URP] Fixed yflip issue when depth texture is required and non-RG is in use.
Fixed yflip issue when depth intermediate texture is required and non-RG is in use Jira: https://jira.unity3d.com/browse/UUM-70472
1 parent 1ca3091 commit d30e7c4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,11 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re
887887
if (useRenderPassEnabled || useDepthPriming)
888888
createColorTexture |= createDepthTexture;
889889

890+
// If gfxAPI yflips intermediate texture, we can't mix-use backbuffer(not flipped) and render texture(flipped) due to different flip state/clipspace y.
891+
// This introduces the final blit pass.
892+
if(SystemInfo.graphicsUVStartsAtTop)
893+
createColorTexture |= createDepthTexture;
894+
890895
//Set rt descriptors so preview camera's have access should it be needed
891896
var colorDescriptor = cameraTargetDescriptor;
892897
colorDescriptor.useMipMap = false;

0 commit comments

Comments
 (0)