Skip to content

Commit

Permalink
Fix Transparency on F3DEX (#657)
Browse files Browse the repository at this point in the history
* Fix f3dex alpha

* Update gfx_pc.cpp
  • Loading branch information
MegaMech authored Aug 15, 2024
1 parent 3d2b4da commit 92bce01
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/graphic/Fast3D/gfx_pc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1473,8 +1473,10 @@ static void gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t vtx3_idx, bo

uint64_t cc_id = g_rdp.combine_mode;
uint64_t cc_options = 0;
bool use_alpha = (g_rdp.other_mode_l & (3 << 20)) == (G_BL_CLR_MEM << 20) &&
(g_rdp.other_mode_l & (3 << 16)) == (G_BL_1MA << 16);
bool use_alpha = ((g_rdp.other_mode_l & (3 << 20)) == (G_BL_CLR_MEM << 20) &&
(g_rdp.other_mode_l & (3 << 16)) == (G_BL_1MA << 16)) ||
((g_rdp.other_mode_l & (3 << 22)) == (G_BL_CLR_MEM << 22) &&
(g_rdp.other_mode_l & (3 << 18)) == (G_BL_1MA << 18));
bool use_fog = (g_rdp.other_mode_l >> 30) == G_BL_CLR_FOG;
bool texture_edge = (g_rdp.other_mode_l & CVG_X_ALPHA) == CVG_X_ALPHA;
bool use_noise = (g_rdp.other_mode_l & (3U << G_MDSFT_ALPHACOMPARE)) == G_AC_DITHER;
Expand Down

0 comments on commit 92bce01

Please sign in to comment.