|
|
@ -260,8 +260,11 @@ void initIsNewSample(FFXM_PARAMETER_INOUT AccumulationPassCommonParams params) |
|
|
params.bIsNewSample = (params.bIsExistingSample == false || bIsResetFrame); |
|
|
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; |
|
|
params.iPxHrPos = iPxHrPos; |
|
|
const FfxFloat32x2 fHrUv = (iPxHrPos + 0.5f) / DisplaySize(); |
|
|
const FfxFloat32x2 fHrUv = (iPxHrPos + 0.5f) / DisplaySize(); |
|
|
params.fHrUv = fHrUv; |
|
|
params.fHrUv = fHrUv; |
|
|
@ -273,12 +276,13 @@ void InitParams(FFXM_PARAMETER_INOUT AccumulationPassCommonParams params, FfxInt |
|
|
params.fHrVelocity = GetPxHrVelocity(params.fMotionVector); |
|
|
params.fHrVelocity = GetPxHrVelocity(params.fMotionVector); |
|
|
|
|
|
|
|
|
ComputeReprojectedUVs(params, params.fReprojectedHrUv, params.bIsExistingSample); |
|
|
ComputeReprojectedUVs(params, params.fReprojectedHrUv, params.bIsExistingSample); |
|
|
|
|
|
|
|
|
|
|
|
return params; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
AccumulateOutputs Accumulate(FfxInt32x2 iPxHrPos) |
|
|
AccumulateOutputs Accumulate(FfxInt32x2 iPxHrPos) |
|
|
{ |
|
|
{ |
|
|
AccumulationPassCommonParams params = (AccumulationPassCommonParams)0; |
|
|
|
|
|
InitParams(params, iPxHrPos); |
|
|
|
|
|
|
|
|
AccumulationPassCommonParams params = InitParams(iPxHrPos); |
|
|
|
|
|
|
|
|
FfxFloat32x3 fHistoryColor = FfxFloat32x3(0, 0, 0); |
|
|
FfxFloat32x3 fHistoryColor = FfxFloat32x3(0, 0, 0); |
|
|
FFXM_MIN16_F2 fLockStatus; |
|
|
FFXM_MIN16_F2 fLockStatus; |
|
|
|