From ad3966f3f6e4efa40b510f815eef66fdd93b48ad Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Sat, 16 Dec 2023 11:35:10 +0100 Subject: [PATCH] Revert "Removed unnecessary aspect ratio lines that broke screen aspect when using non-standard viewports." This reverts commit 79f2ab14bf49f1b35c2fc1a92ebf64a6bf830960. --- .../PostProcessing/Runtime/Effects/SuperResolution.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/SuperResolution.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/SuperResolution.cs index 136569e..e7ff440 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/SuperResolution.cs +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/SuperResolution.cs @@ -156,6 +156,7 @@ namespace UnityEngine.Rendering.PostProcessing _maxRenderSize = new Vector2Int(maxRenderWidth, maxRenderHeight); // Render to a smaller portion of the screen by manipulating the camera's viewport rect + camera.aspect = (_displaySize.x * _originalRect.width) / (_displaySize.y * _originalRect.height); camera.rect = new Rect(0, 0, _originalRect.width * _maxRenderSize.x / _displaySize.x, _originalRect.height * _maxRenderSize.y / _displaySize.y); }