Browse Source

Callbacks don't need to be passed to the FSR3 Context anymore.

fsr3
Nico de Poel 2 years ago
parent
commit
734770b75e
  1. 4
      Assets/Scripts/Core/Fsr3Upscaler.cs
  2. 2
      Assets/Scripts/Fsr3UpscalerImageEffect.cs

4
Assets/Scripts/Core/Fsr3Upscaler.cs

@ -33,7 +33,7 @@ namespace FidelityFX
/// <summary> /// <summary>
/// Creates a new FSR3 Upscaler context with standard parameters that are appropriate for the current platform. /// Creates a new FSR3 Upscaler context with standard parameters that are appropriate for the current platform.
/// </summary> /// </summary>
public static Fsr3UpscalerContext CreateContext(Vector2Int displaySize, Vector2Int maxRenderSize, Fsr3UpscalerShaders shaders, IFsr3UpscalerCallbacks callbacks, InitializationFlags flags = 0)
public static Fsr3UpscalerContext CreateContext(Vector2Int displaySize, Vector2Int maxRenderSize, Fsr3UpscalerShaders shaders, InitializationFlags flags = 0)
{ {
if (SystemInfo.usesReversedZBuffer) if (SystemInfo.usesReversedZBuffer)
flags |= InitializationFlags.EnableDepthInverted; flags |= InitializationFlags.EnableDepthInverted;
@ -52,7 +52,6 @@ namespace FidelityFX
DisplaySize = displaySize, DisplaySize = displaySize,
MaxRenderSize = maxRenderSize, MaxRenderSize = maxRenderSize,
Shaders = shaders, Shaders = shaders,
Callbacks = callbacks,
}; };
var context = new Fsr3UpscalerContext(); var context = new Fsr3UpscalerContext();
@ -168,7 +167,6 @@ namespace FidelityFX
public Vector2Int MaxRenderSize; public Vector2Int MaxRenderSize;
public Vector2Int DisplaySize; public Vector2Int DisplaySize;
public Fsr3UpscalerShaders Shaders; public Fsr3UpscalerShaders Shaders;
public IFsr3UpscalerCallbacks Callbacks;
} }
/// <summary> /// <summary>

2
Assets/Scripts/Fsr3UpscalerImageEffect.cs

@ -193,7 +193,7 @@ namespace FidelityFX
if (enableAutoExposure) flags |= Fsr3Upscaler.InitializationFlags.EnableAutoExposure; if (enableAutoExposure) flags |= Fsr3Upscaler.InitializationFlags.EnableAutoExposure;
if (UsingDynamicResolution()) flags |= Fsr3Upscaler.InitializationFlags.EnableDynamicResolution; if (UsingDynamicResolution()) flags |= Fsr3Upscaler.InitializationFlags.EnableDynamicResolution;
_context = Fsr3Upscaler.CreateContext(_displaySize, _maxRenderSize, shaders, Callbacks, flags);
_context = Fsr3Upscaler.CreateContext(_displaySize, _maxRenderSize, shaders, flags);
_prevDisplaySize = _displaySize; _prevDisplaySize = _displaySize;
_prevQualityMode = qualityMode; _prevQualityMode = qualityMode;

Loading…
Cancel
Save