summaryrefslogtreecommitdiff
path: root/src/code/PreRender.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/code/PreRender.c')
-rw-r--r--src/code/PreRender.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/code/PreRender.c b/src/code/PreRender.c
index df71d059e..e960acfec 100644
--- a/src/code/PreRender.c
+++ b/src/code/PreRender.c
@@ -659,11 +659,12 @@ void PreRender_AntiAliasFilter(PreRender* this, s32 x, s32 y) {
}
}
- // The background color is determined by averaging the penultimate minimum and maximum pixels, and subtracting the
+ // The background color is determined by adding the penultimate minimum and maximum pixels, and subtracting the
// ForeGround color:
- // BackGround = (pMax + pMin) - (ForeGround) * 2
+ // BackGround = (pMax + pMin) - ForeGround
// OutputColor = cvg * ForeGround + (1.0 - cvg) * BackGround
+ // = ForeGround + (1.0 - cvg) * (BackGround - ForeGround)
invCvg = 7 - buffCvg[7];
outR = buffR[7] + ((s32)(invCvg * (pmaxR + pminR - (buffR[7] * 2)) + 4) >> 3);
outG = buffG[7] + ((s32)(invCvg * (pmaxG + pminG - (buffG[7] * 2)) + 4) >> 3);