Browse Source

Reset camera viewport in OnRenderImage when we're not blitting directly to the camera target. This fixes some potential issues with other systems that are affected by when/where the camera viewport is modified.

stable
Nico de Poel 3 years ago
parent
commit
489b8571d2
  1. 5
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/PostProcessLayer.cs

5
Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/PostProcessLayer.cs

@ -292,6 +292,9 @@ namespace UnityEngine.Rendering.PostProcessing
if (!finalBlitToCameraTarget && m_CurrentContext.IsSuperResolutionActive())
{
// Set the camera back to its original parameters, so we can output at full display resolution
superResolution.ResetCameraViewport(m_CurrentContext);
// Blit the upscaled image to the backbuffer
Graphics.Blit(m_upscaledOutput, dst);
m_upscaledOutput.Release();
@ -762,7 +765,7 @@ namespace UnityEngine.Rendering.PostProcessing
return;
// Set the camera back to its original parameters, so we can output at full display resolution
if (m_CurrentContext.IsSuperResolutionActive())
if (finalBlitToCameraTarget && m_CurrentContext.IsSuperResolutionActive())
{
superResolution.ResetCameraViewport(m_CurrentContext);
}

Loading…
Cancel
Save