From 59752120d683394d9292895bcc61e4879d9c2e83 Mon Sep 17 00:00:00 2001 From: lightningterror Date: Tue, 18 Dec 2018 08:31:20 +0100 Subject: [PATCH] tfx.fx: Add support for dfmt to pick the shader for 16bit alpha output. --- plugins/GSdx/res/tfx.fx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/GSdx/res/tfx.fx b/plugins/GSdx/res/tfx.fx index 002855c672..3208c85e29 100644 --- a/plugins/GSdx/res/tfx.fx +++ b/plugins/GSdx/res/tfx.fx @@ -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; }