From 8d6a5fd6943ee69fca4ca8d5e08bc8bc8b264d55 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 3 Aug 2014 18:20:58 -0700 Subject: [PATCH] Use correct stencil values with non-add blending. Otherwise, we get the min/max/etc. value instead. --- GPU/GLES/StateMapping.cpp | 4 ++-- UI/UIShader.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GPU/GLES/StateMapping.cpp b/GPU/GLES/StateMapping.cpp index 742003c273..d2f745b9b4 100644 --- a/GPU/GLES/StateMapping.cpp +++ b/GPU/GLES/StateMapping.cpp @@ -388,9 +388,9 @@ void TransformDrawEngine::ApplyBlendState() { } if (gl_extensions.EXT_blend_minmax || gl_extensions.GLES3) { - glstate.blendEquation.set(eqLookup[blendFuncEq]); + glstate.blendEquationSeparate.set(eqLookup[blendFuncEq], GL_FUNC_ADD); } else { - glstate.blendEquation.set(eqLookupNoMinMax[blendFuncEq]); + glstate.blendEquationSeparate.set(eqLookupNoMinMax[blendFuncEq], GL_FUNC_ADD); } } diff --git a/UI/UIShader.cpp b/UI/UIShader.cpp index 8b82e31cf5..c982d983b9 100644 --- a/UI/UIShader.cpp +++ b/UI/UIShader.cpp @@ -103,7 +103,7 @@ void UIShader_Prepare() glstate.blend.enable(); glstate.blendFuncSeparate.set(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glstate.blendEquation.set(GL_FUNC_ADD); + glstate.blendEquationSeparate.set(GL_FUNC_ADD, GL_FUNC_ADD); glstate.depthWrite.set(GL_TRUE); glstate.colorMask.set(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);