Skip to content

Commit

Permalink
Fix alpha on the edge of the telescope vignette (#878)
Browse files Browse the repository at this point in the history
  • Loading branch information
Archez authored Nov 26, 2024
1 parent 79f3747 commit 851c708
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mm/src/code/z_fbdemo_circle.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,8 @@ void TransitionCircle_LoadAndSetTexture(Gfx** gfxp, TexturePtr texture, s32 fmt,
}

// #region 2S2H [Cosmetic] Adjust circle overlay to support widescreen
// The first wide rectangle instruction renders the tile information on the extra space on the left edge
// The second instruction renders the original overlay in the center and has it extend to the right edge
// gSPTextureRectangle(gfx++, 0, 0, xh << 2, yh << 2, G_TX_RENDERTILE, (s32)(s * (1 << 5)), (s32)(t * (1 << 5)),
// dsdx,
// dtdy);
// The first wide rectangle instruction renders the tile information on the extra space off the left edge
// The second instruction renders the original overlay in the center and has it extended to the right edge
s32 x = OTRGetRectDimensionFromLeftEdge(0) << 2;
if (x < 0) {
// Only render if the screen is wider then original
Expand Down Expand Up @@ -152,6 +149,9 @@ void TransitionCircle_Draw(void* thisx, Gfx** gfxp) {
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, 1, TEXEL0, PRIM_LOD_FRAC, PRIMITIVE, 0, 0, 0, PRIMITIVE, 1, TEXEL0,
PRIM_LOD_FRAC, PRIMITIVE);
}
// 2S2H [Port] We need to set the render mode to XLU_SURF for alpha logic to be used in Fast3D
// If Fast3D changes how it decides alpha in the future, we may be able to remove this line
gDPSetRenderMode(gfx++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
TransitionCircle_LoadAndSetTexture(&gfx, this->texture, G_IM_FMT_I, 0, this->masks, this->maskt,
this->referenceRadius);
gDPPipeSync(gfx++);
Expand Down

0 comments on commit 851c708

Please sign in to comment.