From d1965ee786ae22de7218433ec34ce9b0ac90c04c Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Tue, 30 May 2023 20:42:59 +0200 Subject: [PATCH] Callbacks factory does not need to be static and should not be static (i.e. allow for different callbacks depending on context) --- .../PostProcessing/Runtime/Effects/SuperResolution.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 0aa4e35..3fd9ad7 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 @@ -31,7 +31,7 @@ namespace UnityEngine.Rendering.PostProcessing [Serializable] public class SuperResolution { - public static Func CallbacksFactory { get; set; } = (context) => new Callbacks(context.resources); + public Func callbacksFactory { get; set; } = (context) => new Callbacks(context.resources); [Tooltip("Standard scaling ratio presets.")] public Fsr2.QualityMode qualityMode = Fsr2.QualityMode.Quality; @@ -213,7 +213,7 @@ namespace UnityEngine.Rendering.PostProcessing if (enableFP16) flags |= Fsr2.InitializationFlags.EnableFP16Usage; if (exposureSource == ExposureSource.Auto) flags |= Fsr2.InitializationFlags.EnableAutoExposure; - _callbacks = CallbacksFactory(context); + _callbacks = callbacksFactory(context); _fsrContext = Fsr2.CreateContext(_displaySize, _renderSize, _callbacks, flags); // Apply a mipmap bias so that textures retain their sharpness