From 3a98642307d2d060ca779f3ef73f22c77bd1c7f8 Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Thu, 22 Jun 2023 13:25:20 +0200 Subject: [PATCH] Restore original camera target texture if it hasn't been reset after FSR2 is disabled --- .../PostProcessing/Runtime/PostProcessLayer.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/PostProcessLayer.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/PostProcessLayer.cs index 18f0246..edc1534 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/PostProcessLayer.cs +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/PostProcessLayer.cs @@ -635,6 +635,12 @@ namespace UnityEngine.Rendering.PostProcessing { // Ensure all of FSR2's resources are released when it's not in use superResolution.Release(); + + if (m_originalTargetTexture != null) + { + m_Camera.targetTexture = m_originalTargetTexture; + m_originalTargetTexture = null; + } } context.command = m_LegacyCmdBufferOpaque;