Skip to content

Commit

Permalink
GS:MTL: Fix inverted AEM test
Browse files Browse the repository at this point in the history
  • Loading branch information
TellowKrinkle committed Jan 25, 2022
1 parent cfbc3ec commit ad33347
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pcsx2/GS/Renderers/Metal/tfx.metal
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,9 @@ struct PSMain
}

if (PS_AEM_FMT == FMT_24)
t.a = (PS_AEM || any(bool3(t.rgb))) ? 255.f * cb.ta.x : 0.f;
t.a = (!PS_AEM || any(bool3(t.rgb))) ? 255.f * cb.ta.x : 0.f;
else if (PS_AEM_FMT == FMT_16)
t.a = t.a >= 128.f ? 255.f * cb.ta.y : (PS_AEM || any(bool3(t.rgb))) ? 255.f * cb.ta.x : 0.f;
t.a = t.a >= 128.f ? 255.f * cb.ta.y : (!PS_AEM || any(bool3(t.rgb))) ? 255.f * cb.ta.x : 0.f;

return t;
}
Expand Down Expand Up @@ -523,9 +523,9 @@ struct PSMain
for (int i = 0; i < 4; i++)
{
if (PS_AEM_FMT == FMT_24)
c[i].a = PS_AEM || any(bool3(c[i].rgb)) ? cb.ta.x : 0.f;
c[i].a = !PS_AEM || any(bool3(c[i].rgb)) ? cb.ta.x : 0.f;
else if (PS_AEM_FMT == FMT_16)
c[i].a = c[i].a >= 0.5 ? cb.ta.y : PS_AEM || any(bool3(c[i].rgb)) ? cb.ta.x : 0.f;
c[i].a = c[i].a >= 0.5 ? cb.ta.y : !PS_AEM || any(bool3(c[i].rgb)) ? cb.ta.x : 0.f;
}

if (PS_LTF)
Expand Down

0 comments on commit ad33347

Please sign in to comment.