From 24c42ae2d90bcd0a77fac18098ceadbc2ce808a3 Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Sun, 26 Feb 2023 22:01:03 +0100 Subject: [PATCH] GS-hw: Replace alpha factor/alpha source1 with source 1 color. Output 1 will be used since we want to modify each color channel based on overflow value. --- pcsx2/GS/Renderers/HW/GSRendererHW.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index 7d26a2f117..2b01cfb752 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -3154,6 +3154,12 @@ void GSRendererHW::EmulateBlending(bool& DATE_PRIMID, bool& DATE_BARRIER, bool& } else if (blend_mix2) { + // Allow to compensate when Cs*(Alpha + 1) overflows, to compensate we change + // the alpha output value for Cd*Alpha. + m_conf.blend = {true, GSDevice::CONST_ONE, GSDevice::SRC1_COLOR, blend.op, false, 0}; + m_conf.ps.clr_hw = 3; + m_conf.ps.no_color1 = false; + m_conf.ps.blend_a = 0; m_conf.ps.blend_b = 2; m_conf.ps.blend_d = 0;