Browse Source

Reverted rework of accumulation parameter initialization function to what it originally was, but with a struct clear to zero.

asr-console
Nico de Poel 11 months ago
parent
commit
9ef2bfdef0
  1. 10
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_accumulate.h

10
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;

Loading…
Cancel
Save