mirror of https://github.com/PCSX2/pcsx2.git
tfx.fx: Add support for dfmt to pick the shader for 16bit alpha output.
This commit is contained in:
parent
5527bcb13e
commit
59752120d6
|
@ -39,6 +39,7 @@
|
|||
#define PS_POINT_SAMPLER 0
|
||||
#define PS_SHUFFLE 0
|
||||
#define PS_READ_BA 0
|
||||
#define PS_DFMT 0
|
||||
#define PS_DEPTH_FMT 0
|
||||
#define PS_PAL_FMT 0
|
||||
#define PS_CHANNEL_FETCH 0
|
||||
|
@ -1002,13 +1003,13 @@ PS_OUTPUT ps_main(PS_INPUT input)
|
|||
|
||||
output.c1 = c.a * 2; // used for alpha blending
|
||||
|
||||
if(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;
|
||||
}
|
||||
else if(PS_FBA)
|
||||
else if((PS_DFMT == FMT_32) && PS_FBA)
|
||||
{
|
||||
if(c.a < 0.5) c.a += 0.5;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue