no need to use nonpremultiplied alpha blending

This commit is contained in:
Konstantin Käfer
2014-05-22 15:17:26 +02:00
parent dffbb673ea
commit ba17d2cffc

View File

@@ -8,11 +8,6 @@ void Painter::drawComposite(GLuint texture, const CompositeProperties &propertie
// We're doing full-screen framebuffer blending, so no need to do stencil testing here.
glDisable(GL_STENCIL_TEST);
// Normally, we're using premultiplied alpha, but the resulting image we've
// just drawn is non-premultiplied. That means when blending, we have to make
// sure that we account for that.
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
useProgram(compositeShader->program);
compositeShader->setMatrix(nativeMatrix);
@@ -32,7 +27,4 @@ void Painter::drawComposite(GLuint texture, const CompositeProperties &propertie
// Reset back.
glEnable(GL_STENCIL_TEST);
// Reset back to use premultiplied alpha blending.
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
}