summaryrefslogtreecommitdiff
path: root/src/code/PreRender.c
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2024-06-25 00:39:08 +0200
committerGitHub <noreply@github.com>2024-06-24 18:39:08 -0400
commit2ce4742bf69faebb16ea1710c4d4e7902b1be0f1 (patch)
treefd512e9dca50980936ab32ea30a10575be2879d7 /src/code/PreRender.c
parent4dc70fefeee8f6b587aa611da580141c6b9ea4be (diff)
Fix misc 22 (#1971)
* remove trailing whitespace * fix/docbug about dright for next page of fault menu * // size = ...; -> // size = ... * access `ColliderJntSph.elements` as an array * fixup doc in PreRender.c * empty line after decl * gdSPDefLights1 xyz arguments for direction are signed 8bit values * doc bug of bad use of free in EffDust actor * decimal for Actor.colorFilterTimer * shopItemEntries -> sShopItemEntries * HEISHI4_AT_KAKRIKO_ENTRANCE -> HEISHI4_AT_KAKARIKO_ENTRANCE * format
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);