mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
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).
This commit is contained in:
parent
96208c1694
commit
f5006bdf09
1 changed files with 2 additions and 3 deletions
|
@ -649,9 +649,8 @@ gst_gl_video_mixer_callback (gpointer stuff)
|
||||||
gl->EnableVertexAttribArray (attr_position_loc);
|
gl->EnableVertexAttribArray (attr_position_loc);
|
||||||
gl->EnableVertexAttribArray (attr_texture_loc);
|
gl->EnableVertexAttribArray (attr_texture_loc);
|
||||||
|
|
||||||
gl->BlendFuncSeparate (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE,
|
gl->BlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
GL_ZERO);
|
gl->BlendEquation (GL_FUNC_ADD);
|
||||||
gl->BlendEquationSeparate (GL_FUNC_ADD, GL_FUNC_ADD);
|
|
||||||
|
|
||||||
gl->ActiveTexture (GL_TEXTURE0);
|
gl->ActiveTexture (GL_TEXTURE0);
|
||||||
gl->BindTexture (GL_TEXTURE_2D, in_tex);
|
gl->BindTexture (GL_TEXTURE_2D, in_tex);
|
||||||
|
|
Loading…
Reference in a new issue