From f5006bdf093cd93a615fbf3159125cac4d571069 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Fri, 26 Sep 2014 01:34:54 +1000 Subject: [PATCH] glvideomixer: fix blending with low-alpha sources We also need to apply the blend paramaters to the alpha channel otherwise the output of the blend will appear black at low alpha values (< 0.2). --- ext/gl/gstglvideomixer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ext/gl/gstglvideomixer.c b/ext/gl/gstglvideomixer.c index 9ffdcb6ad4..e04dec3a5d 100644 --- a/ext/gl/gstglvideomixer.c +++ b/ext/gl/gstglvideomixer.c @@ -649,9 +649,8 @@ gst_gl_video_mixer_callback (gpointer stuff) gl->EnableVertexAttribArray (attr_position_loc); gl->EnableVertexAttribArray (attr_texture_loc); - gl->BlendFuncSeparate (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, - GL_ZERO); - gl->BlendEquationSeparate (GL_FUNC_ADD, GL_FUNC_ADD); + gl->BlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gl->BlendEquation (GL_FUNC_ADD); gl->ActiveTexture (GL_TEXTURE0); gl->BindTexture (GL_TEXTURE_2D, in_tex);