Turn off regular alpha blending

This commit is contained in:
raven02 2014-04-13 16:03:50 +08:00
parent e358a6dcbe
commit f1254c79ed

View file

@ -325,7 +325,12 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
}
if (((blendFuncEq >= GE_BLENDMODE_MIN) && gl_extensions.EXT_blend_minmax) || gl_extensions.GLES3) {
glstate.blendEquation.set(eqLookup[blendFuncEq]);
if (blendFuncEq == GE_BLENDMODE_ABSDIFF && gl_extensions.EXT_shader_framebuffer_fetch) {
// Handle GE_BLENDMODE_ABSDIFF in fragment shader and turn off regular alpha blending here.
glstate.blend.set(false);
} else {
glstate.blendEquation.set(eqLookup[blendFuncEq]);
}
} else {
glstate.blendEquation.set(eqLookupNoMinMax[blendFuncEq]);
}