Skip to content

Commit c8c68f9

Browse files
author
Evergreen
committed
[6000.0]Fix Multiple errors occur when setting the Render Object Event to AfterRenderingPostProcessing while using STP for Upscaling
1 parent cf00918 commit c8c68f9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Packages/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineAsset/UniversalRenderPipelineAssetUI.Drawers.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,12 @@ static void DrawQuality(SerializedUniversalRenderPipelineAsset serialized, Edito
210210
EditorGUILayout.HelpBox(Styles.stpMobilePlatformWarning, MessageType.Warning, true);
211211
}
212212
}
213+
214+
if (serialized.renderScale.floatValue < 1.0f || serialized.asset.upscalingFilter == UpscalingFilterSelection.STP || serialized.asset.upscalingFilter == UpscalingFilterSelection.FSR)
215+
{
216+
EditorGUILayout.HelpBox("Camera depth isn't supported when Upscaling is turned on in the game view. We will automatically fall back to not doing depth-testing for this pass.", MessageType.Warning, true);
217+
}
218+
213219
EditorGUILayout.PropertyField(serialized.enableLODCrossFadeProp, Styles.enableLODCrossFadeText);
214220
EditorGUI.BeginDisabledGroup(!serialized.enableLODCrossFadeProp.boolValue);
215221
EditorGUILayout.PropertyField(serialized.lodCrossFadeDitheringTypeProp, Styles.lodCrossFadeDitheringTypeText);

Packages/com.unity.render-pipelines.universal/Runtime/Passes/RenderObjectsPass.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer
279279

280280
passData.color = resourceData.activeColorTexture;
281281
builder.SetRenderAttachment(resourceData.activeColorTexture, 0, AccessFlags.Write);
282-
builder.SetRenderAttachmentDepth(resourceData.activeDepthTexture, AccessFlags.Write);
282+
if (cameraData.imageScalingMode != ImageScalingMode.Upscaling || passData.renderPassEvent != RenderPassEvent.AfterRenderingPostProcessing)
283+
builder.SetRenderAttachmentDepth(resourceData.activeDepthTexture, AccessFlags.Write);
283284

284285
TextureHandle mainShadowsTexture = resourceData.mainShadowsTexture;
285286
TextureHandle additionalShadowsTexture = resourceData.additionalShadowsTexture;

0 commit comments

Comments
 (0)