mirror of https://github.com/PCSX2/pcsx2.git
GS-metal: Move PABE shader bit to the top of sw blending.
Early return when there is no sw blending, no need to run the blend code. Optimization.
This commit is contained in:
parent
c0e325dfbf
commit
7a5f63e0f5
|
@ -725,6 +725,13 @@ struct PSMain
|
||||||
{
|
{
|
||||||
if (SW_BLEND)
|
if (SW_BLEND)
|
||||||
{
|
{
|
||||||
|
// PABE
|
||||||
|
if (PS_PABE)
|
||||||
|
{
|
||||||
|
// No blending so early exit
|
||||||
|
if (As < 1.0f)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
float Ad = PS_DFMT == FMT_24 ? 1.f : trunc(current_color.a * 255.5f) / 128.f;
|
float Ad = PS_DFMT == FMT_24 ? 1.f : trunc(current_color.a * 255.5f) / 128.f;
|
||||||
|
|
||||||
|
@ -743,9 +750,6 @@ struct PSMain
|
||||||
Color.rgb = D;
|
Color.rgb = D;
|
||||||
else
|
else
|
||||||
Color.rgb = trunc((A - B) * C + D);
|
Color.rgb = trunc((A - B) * C + D);
|
||||||
|
|
||||||
if (PS_PABE)
|
|
||||||
Color.rgb = (As >= 1.f) ? Color.rgb : Cs;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue