GS-hw: Use rgb color for second output instead of alpha.

We want different alpha value for each channel.
This commit is contained in:
lightningterror 2023-02-21 17:48:02 +01:00
parent c12b412e87
commit 37b19495a8
2 changed files with 3 additions and 4 deletions

View File

@ -858,8 +858,8 @@ public:
__fi static constexpr bool IsDualSourceBlendFactor(u8 factor)
{
return (factor == SRC1_ALPHA || factor == INV_SRC1_ALPHA
/*|| factor == SRC1_COLOR || factor == INV_SRC1_COLOR*/); // not used
return (factor == SRC1_ALPHA || factor == INV_SRC1_ALPHA || factor == SRC1_COLOR
/* || factor == INV_SRC1_COLOR*/); // not used
}
__fi static constexpr bool IsConstantBlendFactor(u16 factor)
{

View File

@ -3088,10 +3088,9 @@ void GSRendererHW::EmulateBlending(bool& DATE_PRIMID, bool& DATE_BARRIER, bool&
// Replace Cs*F + Cd*(1 - F) with Cs*F - Cd*(F - 1).
// As - 1 or F - 1 subtraction is only done for the dual source output (hw blending part) since we are changing the equation.
// Af will be replaced with As in shader and send it to dual source output.
m_conf.blend = {true, GSDevice::CONST_ONE, GSDevice::SRC1_ALPHA, GSDevice::OP_SUBTRACT, false, 0};
m_conf.blend = {true, GSDevice::CONST_ONE, GSDevice::SRC1_COLOR, GSDevice::OP_SUBTRACT, false, 0};
// clr_hw 1 will disable alpha clamp, we can reuse the old bits.
m_conf.ps.clr_hw = 1;
//m_conf.ps.blend_mix = 0;
// DSB output will always be used.
m_conf.ps.no_color1 = false;
}