Skip to content

Commit

Permalink
Merge pull request #975 from bigianb/blendfix
Browse files Browse the repository at this point in the history
Implement 2000 blend mode. Used by BGDA
  • Loading branch information
jpd002 committed Nov 8, 2020
2 parents 1218f5a + e1b6c1b commit 940b023
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/gs/GSH_OpenGL/GSH_OpenGL.cpp
Expand Up @@ -820,6 +820,11 @@ void CGSH_OpenGL::SetupBlendingFunction(uint64 alphaReg)
glBlendColor(0, 0, 0, static_cast<float>(alpha.nFix) / 128.0f);
glBlendFuncSeparate(GL_ZERO, GL_CONSTANT_ALPHA, GL_ONE, GL_ZERO);
}
else if((alpha.nA == ALPHABLEND_ABD_ZERO) && (alpha.nB == ALPHABLEND_ABD_CS) && (alpha.nC == ALPHABLEND_C_AS) && (alpha.nD == ALPHABLEND_ABD_CS))
{
//2000 -> Cs * (1 - As)
glBlendFuncSeparate(BLEND_ONE_MINUS_SRC_ALPHA, GL_ZERO, GL_ONE, GL_ZERO);
}
else if((alpha.nA == ALPHABLEND_ABD_ZERO) && (alpha.nB == ALPHABLEND_ABD_CS) && (alpha.nC == ALPHABLEND_C_AS) && (alpha.nD == ALPHABLEND_ABD_CD))
{
//2001 -> Cd - Cs * As
Expand Down

0 comments on commit 940b023

Please sign in to comment.