From cf6403ae65c2df8fba8509de28e2c00aa49d98e3 Mon Sep 17 00:00:00 2001 From: Jaiden <56970334+JaidenAlemni@users.noreply.github.com> Date: Sun, 19 Sep 2021 09:07:21 -0400 Subject: [PATCH] Update glstate.cpp Fixes the GL blend formula for Subtractive blending --- src/glstate.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/glstate.cpp b/src/glstate.cpp index 83ca4e7..0fbcdc6 100644 --- a/src/glstate.cpp +++ b/src/glstate.cpp @@ -84,10 +84,9 @@ void GLBlendMode::apply(const BlendType &value) break; case BlendSubstraction : - // FIXME Alpha calculation is untested gl.BlendEquation(GL_FUNC_REVERSE_SUBTRACT); gl.BlendFuncSeparate(GL_SRC_ALPHA, GL_ONE, - GL_ONE, GL_ONE); + GL_ZERO, GL_ONE); break; } }