Browse Source

Restore original camera target texture if it hasn't been reset after FSR2 is disabled

fsr2
Nico de Poel 3 years ago
parent
commit
3a98642307
  1. 6
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/PostProcessLayer.cs

6
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 // Ensure all of FSR2's resources are released when it's not in use
superResolution.Release(); superResolution.Release();
if (m_originalTargetTexture != null)
{
m_Camera.targetTexture = m_originalTargetTexture;
m_originalTargetTexture = null;
}
} }
context.command = m_LegacyCmdBufferOpaque; context.command = m_LegacyCmdBufferOpaque;

Loading…
Cancel
Save