mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 13:25:56 +00:00
Revert "gl: use correct blend functions for unpremultiplied alpha"
This reverts commit 779d028f27
.
This commit is contained in:
parent
779d028f27
commit
452d90a88c
2 changed files with 2 additions and 13 deletions
|
@ -2237,14 +2237,7 @@ gst_glimage_sink_on_draw (GstGLImageSink * gl_sink)
|
||||||
|
|
||||||
if (gl_sink->ignore_alpha) {
|
if (gl_sink->ignore_alpha) {
|
||||||
gl->BlendColor (0.0, 0.0, 0.0, alpha);
|
gl->BlendColor (0.0, 0.0, 0.0, alpha);
|
||||||
if (gl->BlendFuncSeparate) {
|
gl->BlendFunc (GL_SRC_ALPHA, GL_CONSTANT_COLOR);
|
||||||
gl->BlendFuncSeparate (GL_SRC_ALPHA, GL_CONSTANT_COLOR, GL_ONE,
|
|
||||||
GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
} else {
|
|
||||||
/* we don't have separate blend modes, perform something close to
|
|
||||||
* correct instead */
|
|
||||||
gl->BlendFunc (GL_SRC_ALPHA, GL_CONSTANT_COLOR);
|
|
||||||
}
|
|
||||||
gl->BlendEquation (GL_FUNC_ADD);
|
gl->BlendEquation (GL_FUNC_ADD);
|
||||||
gl->Enable (GL_BLEND);
|
gl->Enable (GL_BLEND);
|
||||||
}
|
}
|
||||||
|
|
|
@ -530,11 +530,7 @@ gst_gl_overlay_callback (GstGLFilter * filter, GstGLMemory * in_tex,
|
||||||
gst_gl_shader_set_uniform_1f (overlay->shader, "alpha", overlay->alpha);
|
gst_gl_shader_set_uniform_1f (overlay->shader, "alpha", overlay->alpha);
|
||||||
|
|
||||||
gl->Enable (GL_BLEND);
|
gl->Enable (GL_BLEND);
|
||||||
if (gl->BlendFuncSeparate)
|
gl->BlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
gl->BlendFuncSeparate (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE,
|
|
||||||
GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
else
|
|
||||||
gl->BlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
gl->BlendEquation (GL_FUNC_ADD);
|
gl->BlendEquation (GL_FUNC_ADD);
|
||||||
|
|
||||||
gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
|
gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
|
||||||
|
|
Loading…
Reference in a new issue