Browse Source

Removed unnecessary aspect ratio lines that broke screen aspect when using non-standard viewports.

fsr2
Nico de Poel 2 years ago
parent
commit
79f2ab14bf
  1. 1
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/SuperResolution.cs

1
Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/SuperResolution.cs

@ -156,7 +156,6 @@ 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);
}

Loading…
Cancel
Save