Browse Source

Fixed input resource size to match the lower internal render resolution. At the time this code gets called, the context's width and height will have already been increased to display resolution, which are the incorrect values for this field.

stable
Nico de Poel 3 years ago
parent
commit
0d6ba46401
  1. 2
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/SuperResolution.cs

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

@ -288,7 +288,7 @@ namespace UnityEngine.Rendering.PostProcessing
_dispatchDescription.MotionVectorScale.x = -_renderSize.x;
_dispatchDescription.MotionVectorScale.y = -_renderSize.y;
_dispatchDescription.RenderSize = _renderSize;
_dispatchDescription.InputResourceSize = new Vector2Int(context.width, context.height);
_dispatchDescription.InputResourceSize = _renderSize; // TODO: this may need to be maxRenderSize to support dynamic resolution
_dispatchDescription.FrameTimeDelta = Time.unscaledDeltaTime;
_dispatchDescription.CameraNear = camera.nearClipPlane;
_dispatchDescription.CameraFar = camera.farClipPlane;

Loading…
Cancel
Save