gsdx-ogl: fix blending regression (VP2)

Negative factor must be disabled in negative accumulation "-Cs*As + Cd"
Shader must output Cs*As and blending unit will do the Cd - C subtraction
This commit is contained in:
Gregory Hainaut 2015-08-18 09:14:11 +02:00
parent 9e97742a95
commit 37661f3a86
1 changed files with 7 additions and 0 deletions

View File

@ -397,6 +397,13 @@ bool GSRendererOGL::EmulateBlending(GSDeviceOGL::PSSelector& ps_sel, bool DATE_G
if (accumulation_blend) {
// Keep HW blending to do the addition/subtraction
dev->OMSetBlendState(blend_index);
if (ALPHA.A == 2) {
// The blend unit does a reverse subtraction so it means
// the shader must output a positive value.
// Replace 0 - Cs by Cs - 0
ps_sel.blend_a = ALPHA.B;
ps_sel.blend_b = 2;
}
// Remove the addition/substraction from the SW blending
ps_sel.blend_d = 2;
} else {