diff --git a/src/backend/gl/gl_common.c b/src/backend/gl/gl_common.c index 9710baa..eb13f44 100644 --- a/src/backend/gl/gl_common.c +++ b/src/backend/gl/gl_common.c @@ -1358,8 +1358,9 @@ static inline void gl_image_decouple(backend_t *base, struct gl_image *img) { static void gl_image_apply_alpha(backend_t *base, struct gl_image *img, const region_t *reg_op, double alpha) { - glBlendFunc(GL_ONE, GL_CONSTANT_COLOR); - glBlendColor((GLclampf)alpha, (GLclampf)alpha, (GLclampf)alpha, (GLclampf)alpha); + // Result color = 0 (GL_ZERO) + alpha (GL_CONSTANT_ALPHA) * original color + glBlendFunc(GL_ZERO, GL_CONSTANT_ALPHA); + glBlendColor(0, 0, 0, (GLclampf)alpha); GLuint fbo; glGenFramebuffers(1, &fbo); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo);