From 0dc391077dd55efec8b878c46046eaffec7569cc Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy Date: Mon, 28 Apr 2025 03:15:40 -0400 Subject: [PATCH] Change addressing mode on title card rect to prevent wrapping on the left edge when HD textures are in use --- patches/ui_patches.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/patches/ui_patches.c b/patches/ui_patches.c index 87dcfdd..989ddd8 100644 --- a/patches/ui_patches.c +++ b/patches/ui_patches.c @@ -1201,8 +1201,10 @@ RECOMP_PATCH void Message_DrawSceneTitleCard(PlayState* play, Gfx** gfxP) { gDPSetAlphaDither(gfx++, G_AD_NOTPATTERN); gDPSetPrimColor(gfx++, 0, 0, 0, 0, 0, msgCtx->textboxColorAlphaCurrent); gDPSetEnvColor(gfx++, 140, 40, 160, 255); - gDPLoadTextureBlock(gfx++, gSceneTitleCardGradientTex, G_IM_FMT_I, G_IM_SIZ_8b, 64, 1, 0, G_TX_NOMIRROR | G_TX_WRAP, - G_TX_NOMIRROR | G_TX_WRAP, 6, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + // @recomp Use clamp as the addressing mode to prevent the texture from wrapping on the left edge, which can be visible + // if HD textures are in use. + gDPLoadTextureBlock(gfx++, gSceneTitleCardGradientTex, G_IM_FMT_I, G_IM_SIZ_8b, 64, 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, + G_TX_NOMIRROR | G_TX_CLAMP, 6, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); // @recomp Decrease dsdx from the original 204 to 200 in order to hide the glitching on the right edge. gSPTextureRectangle(gfx++, 0, XREG(77) << 2, 320 << 2, (XREG(77) + XREG(76)) << 2, G_TX_RENDERTILE, 0, 0, 200, 1 << 10);