From aca067bff01d487bd7734d56b956604845343c4b Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Tue, 9 Jul 2024 20:24:54 +0200 Subject: [PATCH] Updated debug checks --- Assets/Scripts/Core/Fsr3UpscalerContext.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Core/Fsr3UpscalerContext.cs b/Assets/Scripts/Core/Fsr3UpscalerContext.cs index d7a86c3..d3cf3c7 100644 --- a/Assets/Scripts/Core/Fsr3UpscalerContext.cs +++ b/Assets/Scripts/Core/Fsr3UpscalerContext.cs @@ -479,14 +479,14 @@ namespace FidelityFX Debug.LogError("MotionVectors resource is null"); } - if (!dispatchParams.Output.IsValid) + if (dispatchParams.Exposure.IsValid && (_contextDescription.Flags & Fsr3Upscaler.InitializationFlags.EnableAutoExposure) != 0) { - Debug.LogError("Output resource is null"); + Debug.LogWarning("Exposure resource provided, however auto exposure flag is present"); } - if (dispatchParams.Exposure.IsValid && (_contextDescription.Flags & Fsr3Upscaler.InitializationFlags.EnableAutoExposure) != 0) + if (!dispatchParams.Output.IsValid) { - Debug.LogWarning("Exposure resource provided, however auto exposure flag is present"); + Debug.LogError("Output resource is null"); } if (Mathf.Abs(dispatchParams.JitterOffset.x) > 1.0f || Mathf.Abs(dispatchParams.JitterOffset.y) > 1.0f) @@ -514,6 +514,11 @@ namespace FidelityFX Debug.LogWarning("RenderSize contains zero dimension"); } + if (dispatchParams.Sharpness < 0.0f || dispatchParams.Sharpness > 1.0f) + { + Debug.LogWarning("Sharpness contains value outside of expected range [0.0, 1.0]"); + } + if (dispatchParams.FrameTimeDelta > 1.0f) { Debug.LogWarning("FrameTimeDelta is greater than 1.0f - this value should be seconds (~0.0166 for 60fps)");