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 3fd9ad7..5f332b0 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 @@ -218,11 +218,15 @@ namespace UnityEngine.Rendering.PostProcessing // Apply a mipmap bias so that textures retain their sharpness float biasOffset = Fsr2.GetMipmapBiasOffset(_renderSize.x, _displaySize.x); - if (!float.IsNaN(biasOffset)) + if (!float.IsNaN(biasOffset) && !float.IsInfinity(biasOffset)) { _callbacks.ApplyMipmapBias(biasOffset); _appliedBiasOffset = biasOffset; } + else + { + _appliedBiasOffset = 0f; + } } private void DestroyFsrContext() @@ -233,7 +237,7 @@ namespace UnityEngine.Rendering.PostProcessing _fsrContext = null; } - if (!float.IsNaN(_appliedBiasOffset) && _appliedBiasOffset != 0f) + if (!float.IsNaN(_appliedBiasOffset) && !float.IsInfinity(_appliedBiasOffset) && _appliedBiasOffset != 0f) { _callbacks.ApplyMipmapBias(-_appliedBiasOffset); _appliedBiasOffset = 0f;