Browse Source

Bits and bobs

stable
Nico de Poel 3 years ago
parent
commit
66cf9bf16a
  1. 6
      Assets/Scenes/SampleScenePPV2.unity
  2. 4
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/SuperResolution.cs

6
Assets/Scenes/SampleScenePPV2.unity

@ -361,6 +361,12 @@ MonoBehaviour:
cutoffThreshold: 0.2
binaryValue: 0.9
flags: 13
autoGenerateTransparencyAndComposition: 0
generateTransparencyAndCompositionParameters:
autoTcThreshold: 0.05
autoTcScale: 1
autoReactiveScale: 5
autoReactiveMax: 0.9
subpixelMorphologicalAntialiasing:
quality: 2
fastApproximateAntialiasing:

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

@ -141,12 +141,12 @@ namespace UnityEngine.Rendering.PostProcessing
var camera = context.camera;
_originalRect = camera.rect;
_displaySize = new Vector2Int(camera.pixelWidth, camera.pixelHeight); // TODO: also support render texture targets properly
_displaySize = new Vector2Int(camera.pixelWidth, camera.pixelHeight);
Fsr2.GetRenderResolutionFromQualityMode(out int renderWidth, out int renderHeight, _displaySize.x, _displaySize.y, qualityMode);
_renderSize = new Vector2Int(renderWidth, renderHeight);
camera.aspect = (_displaySize.x * _originalRect.width) / (_displaySize.y * _originalRect.height);
camera.rect = new Rect(0, 0, _originalRect.width * _renderSize.x / camera.pixelWidth, _originalRect.height * _renderSize.y / camera.pixelHeight);
camera.rect = new Rect(0, 0, _originalRect.width * _renderSize.x / _displaySize.x, _originalRect.height * _renderSize.y / _displaySize.y);
}
public void ResetCameraViewport(PostProcessRenderContext context)

Loading…
Cancel
Save