diff --git a/Runtime/FSR3/Fsr3Upscaler.cs b/Runtime/FSR3/Fsr3Upscaler.cs index 374db52..6b3ad77 100644 --- a/Runtime/FSR3/Fsr3Upscaler.cs +++ b/Runtime/FSR3/Fsr3Upscaler.cs @@ -200,6 +200,7 @@ namespace FidelityFX.FSR3 public float CameraFar; public float CameraFovAngleVertical; public float ViewSpaceToMetersFactor; + public float VelocityFactor = 1.0f; public DispatchFlags Flags; public bool UseTextureArrays; // Enable texture array bindings, primarily used for HDRP and XR diff --git a/Runtime/FSR3/Fsr3UpscalerContext.cs b/Runtime/FSR3/Fsr3UpscalerContext.cs index 75ad8f9..07f1af7 100644 --- a/Runtime/FSR3/Fsr3UpscalerContext.cs +++ b/Runtime/FSR3/Fsr3UpscalerContext.cs @@ -34,11 +34,6 @@ namespace FidelityFX.FSR3 public class Fsr3UpscalerContext { private const int MaxQueuedFrames = 16; - - public float VelocityFactor - { - set => UpscalerConsts.velocityFactor = Mathf.Clamp01(value); - } private Fsr3Upscaler.ContextDescription _contextDescription; private CommandBuffer _commandBuffer; @@ -413,6 +408,8 @@ namespace FidelityFX.FSR3 constants.frameIndex = 0; else constants.frameIndex += 1.0f; + + constants.velocityFactor = dispatchParams.VelocityFactor; } private Vector4 SetupDeviceDepthToViewSpaceDepthParams(Fsr3Upscaler.DispatchDescription dispatchParams)