Skip to content

Commit

Permalink
tfx.fx: Correct a couple more blending factors.
Browse files Browse the repository at this point in the history
Chane 0.5 to 128.0f/255.0f which is 0.50196078431.
Just to be safe it's accurate.
  • Loading branch information
lightningterror committed Jan 18, 2019
1 parent 0c3a0da commit f28f038
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/GSdx/res/tfx.fx
Original file line number Diff line number Diff line change
Expand Up @@ -892,15 +892,15 @@ PS_OUTPUT ps_main(PS_INPUT input)

output.c1 = c.a * 255.0f / 128.0f; // used for alpha blending

if((PS_DFMT == FMT_16) || PS_AOUT) // 16 bit output
if ((PS_DFMT == FMT_16) || PS_AOUT) // 16 bit output
{
float a = 128.0f / 255; // alpha output will be 0x80

c.a = PS_FBA ? a : step(0.5, c.a) * a;
c.a = PS_FBA ? a : step(128.0f / 255.0f, c.a) * a;
}
else if((PS_DFMT == FMT_32) && PS_FBA)
else if ((PS_DFMT == FMT_32) && PS_FBA)
{
if(c.a < 0.5) c.a += 128.0f/255.0f;
if (c.a < 128.0f / 255.0f) c.a += 128.0f / 255.0f;
}

output.c0 = c;
Expand Down

0 comments on commit f28f038

Please sign in to comment.