From 9ef2bfdef0d02ec0e15e81ed196d1ebf8088a4e7 Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Sun, 23 Mar 2025 18:56:02 +0100 Subject: [PATCH] Reverted rework of accumulation parameter initialization function to what it originally was, but with a struct clear to zero. --- .../ASR/Shaders/shaders/fsr2/ffxm_fsr2_accumulate.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_accumulate.h b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_accumulate.h index 2b28504..1120019 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_accumulate.h +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_accumulate.h @@ -260,8 +260,11 @@ void initIsNewSample(FFXM_PARAMETER_INOUT AccumulationPassCommonParams params) params.bIsNewSample = (params.bIsExistingSample == false || bIsResetFrame); } -void InitParams(FFXM_PARAMETER_INOUT AccumulationPassCommonParams params, FfxInt32x2 iPxHrPos) + +AccumulationPassCommonParams InitParams(FfxInt32x2 iPxHrPos) { + AccumulationPassCommonParams params = (AccumulationPassCommonParams)0; + params.iPxHrPos = iPxHrPos; const FfxFloat32x2 fHrUv = (iPxHrPos + 0.5f) / DisplaySize(); params.fHrUv = fHrUv; @@ -273,12 +276,13 @@ void InitParams(FFXM_PARAMETER_INOUT AccumulationPassCommonParams params, FfxInt params.fHrVelocity = GetPxHrVelocity(params.fMotionVector); ComputeReprojectedUVs(params, params.fReprojectedHrUv, params.bIsExistingSample); + + return params; } AccumulateOutputs Accumulate(FfxInt32x2 iPxHrPos) { - AccumulationPassCommonParams params = (AccumulationPassCommonParams)0; - InitParams(params, iPxHrPos); + AccumulationPassCommonParams params = InitParams(iPxHrPos); FfxFloat32x3 fHistoryColor = FfxFloat32x3(0, 0, 0); FFXM_MIN16_F2 fLockStatus;