Browse Source

Changed velocity factor integration in a way that isn't stupid

fsr3.1.1
Nico de Poel 1 year ago
parent
commit
3dd791eb84
  1. 1
      Runtime/FSR3/Fsr3Upscaler.cs
  2. 7
      Runtime/FSR3/Fsr3UpscalerContext.cs

1
Runtime/FSR3/Fsr3Upscaler.cs

@ -200,6 +200,7 @@ namespace FidelityFX.FSR3
public float CameraFar; public float CameraFar;
public float CameraFovAngleVertical; public float CameraFovAngleVertical;
public float ViewSpaceToMetersFactor; public float ViewSpaceToMetersFactor;
public float VelocityFactor = 1.0f;
public DispatchFlags Flags; public DispatchFlags Flags;
public bool UseTextureArrays; // Enable texture array bindings, primarily used for HDRP and XR public bool UseTextureArrays; // Enable texture array bindings, primarily used for HDRP and XR

7
Runtime/FSR3/Fsr3UpscalerContext.cs

@ -35,11 +35,6 @@ namespace FidelityFX.FSR3
{ {
private const int MaxQueuedFrames = 16; private const int MaxQueuedFrames = 16;
public float VelocityFactor
{
set => UpscalerConsts.velocityFactor = Mathf.Clamp01(value);
}
private Fsr3Upscaler.ContextDescription _contextDescription; private Fsr3Upscaler.ContextDescription _contextDescription;
private CommandBuffer _commandBuffer; private CommandBuffer _commandBuffer;
@ -413,6 +408,8 @@ namespace FidelityFX.FSR3
constants.frameIndex = 0; constants.frameIndex = 0;
else else
constants.frameIndex += 1.0f; constants.frameIndex += 1.0f;
constants.velocityFactor = dispatchParams.VelocityFactor;
} }
private Vector4 SetupDeviceDepthToViewSpaceDepthParams(Fsr3Upscaler.DispatchDescription dispatchParams) private Vector4 SetupDeviceDepthToViewSpaceDepthParams(Fsr3Upscaler.DispatchDescription dispatchParams)

Loading…
Cancel
Save