diff --git a/Assets/Scripts/Core/Fsr2Context.cs b/Assets/Scripts/Core/Fsr2Context.cs index 5c8975c..13d7cf8 100644 --- a/Assets/Scripts/Core/Fsr2Context.cs +++ b/Assets/Scripts/Core/Fsr2Context.cs @@ -214,6 +214,11 @@ namespace FidelityFX commandBuffer.ClearRenderTarget(false, true, Color.clear); } + // FSR3: need to clear here since we need the content of this surface for frame interpolation, so clearing in the lock pass is not an option + bool depthInverted = (_contextDescription.Flags & Fsr2.InitializationFlags.EnableDepthInverted) == Fsr2.InitializationFlags.EnableDepthInverted; + commandBuffer.SetRenderTarget(Fsr2ShaderIDs.UavReconstructedPrevNearestDepth); + commandBuffer.ClearRenderTarget(false, true, depthInverted ? Color.clear : Color.white); + // Auto exposure SetupSpdConstants(dispatchParams, out var dispatchThreadGroupCount);