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;