From 6279ae63ceffafa5ef73429be12c5ed3b79515d0 Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Thu, 1 Sep 2022 00:48:35 +0200 Subject: [PATCH] GS-hw: Remove remaining 24bit destination checks for Ad. --- bin/resources/shaders/dx11/tfx.fx | 2 +- bin/resources/shaders/opengl/tfx_fs.glsl | 2 +- bin/resources/shaders/vulkan/tfx.glsl | 2 +- pcsx2/GS/Renderers/Metal/tfx.metal | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/resources/shaders/dx11/tfx.fx b/bin/resources/shaders/dx11/tfx.fx index a739e124c6..6686e3270a 100644 --- a/bin/resources/shaders/dx11/tfx.fx +++ b/bin/resources/shaders/dx11/tfx.fx @@ -890,7 +890,7 @@ PS_OUTPUT ps_main(PS_INPUT input) if (PS_BLEND_C == 1 && PS_CLR_HW > 3) { float4 RT = trunc(RtTexture.Load(int3(input.p.xy, 0)) * 255.0f + 0.1f); - alpha_blend = (PS_DFMT == FMT_24) ? 1.0f : RT.a / 128.0f; + alpha_blend = RT.a / 128.0f; } else { diff --git a/bin/resources/shaders/opengl/tfx_fs.glsl b/bin/resources/shaders/opengl/tfx_fs.glsl index 0bf7b41951..2ad528ac96 100644 --- a/bin/resources/shaders/opengl/tfx_fs.glsl +++ b/bin/resources/shaders/opengl/tfx_fs.glsl @@ -938,7 +938,7 @@ void ps_main() #else vec4 RT = trunc(texelFetch(RtSampler, ivec2(gl_FragCoord.xy), 0) * 255.0f + 0.1f); #endif - float alpha_blend = (PS_DFMT == FMT_24) ? 1.0f : RT.a / 128.0f; + float alpha_blend = RT.a / 128.0f; #else float alpha_blend = C.a / 128.0f; #endif diff --git a/bin/resources/shaders/vulkan/tfx.glsl b/bin/resources/shaders/vulkan/tfx.glsl index d746d78a50..fa426e59d8 100644 --- a/bin/resources/shaders/vulkan/tfx.glsl +++ b/bin/resources/shaders/vulkan/tfx.glsl @@ -1194,7 +1194,7 @@ void main() #if (PS_BLEND_C == 1 && PS_CLR_HW > 3) vec4 RT = trunc(subpassLoad(RtSampler) * 255.0f + 0.1f); - float alpha_blend = (PS_DFMT == FMT_24) ? 1.0f : RT.a / 128.0f; + float alpha_blend = RT.a / 128.0f; #else float alpha_blend = C.a / 128.0f; #endif diff --git a/pcsx2/GS/Renderers/Metal/tfx.metal b/pcsx2/GS/Renderers/Metal/tfx.metal index 36370b131f..bb31364bea 100644 --- a/pcsx2/GS/Renderers/Metal/tfx.metal +++ b/pcsx2/GS/Renderers/Metal/tfx.metal @@ -941,7 +941,7 @@ struct PSMain C.a = 128.0f; } - float alpha_blend = SW_AD_TO_HW ? (PS_DFMT == FMT_24 ? 1.f : trunc(current_color.a * 255.5f) / 128.f) : (C.a / 128.f); + float alpha_blend = SW_AD_TO_HW ? (trunc(current_color.a * 255.5f) / 128.f) : (C.a / 128.f); if (PS_DFMT == FMT_16) {