diff --git a/libkwineffects/kwinglcolorcorrection.cpp b/libkwineffects/kwinglcolorcorrection.cpp index 4b43de5ae0..0f46189e0c 100644 --- a/libkwineffects/kwinglcolorcorrection.cpp +++ b/libkwineffects/kwinglcolorcorrection.cpp @@ -235,7 +235,7 @@ void ColorServerInterface::callFinishedSlot(QDBusPendingCallWatcher *watcher) static const char s_ccVars[] = "uniform sampler3D u_ccLookupTexture;\n"; static const char s_ccAlteration[] = - "gl_FragColor.rgb = texture3D(u_ccLookupTexture, gl_FragColor.rgb / gl_FragColor.a).rgb;\n"; + "gl_FragColor.rgb = texture3D(u_ccLookupTexture, gl_FragColor.rgb / gl_FragColor.a).rgb * gl_FragColor.a;\n"; /* diff --git a/scene_opengl.cpp b/scene_opengl.cpp index d463631672..b73e606817 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -1240,8 +1240,6 @@ void SceneOpenGL2Window::beginRenderWindow(int mask, const WindowPaintData &data } shader->setUniform(GLShader::WindowTransformation, transformation(mask, data)); - - static_cast(m_scene)->colorCorrection()->setupForOutput(data.screen()); } void SceneOpenGL2Window::endRenderWindow(const WindowPaintData &data) @@ -1270,15 +1268,11 @@ void SceneOpenGL2Window::prepareStates(TextureType type, qreal opacity, qreal br } if (!opaque) { glEnable(GL_BLEND); - if (static_cast(m_scene)->colorCorrection()->isEnabled()) { - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + if (alpha) { + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); } else { - if (alpha) { - glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - } else { - glBlendColor((float)opacity, (float)opacity, (float)opacity, (float)opacity); - glBlendFunc(GL_ONE, GL_ONE_MINUS_CONSTANT_ALPHA); - } + glBlendColor((float)opacity, (float)opacity, (float)opacity, (float)opacity); + glBlendFunc(GL_ONE, GL_ONE_MINUS_CONSTANT_ALPHA); } } m_blendingEnabled = !opaque;