From 08139ace98fbb322dff13a686c2140ecab6ebac5 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 1 Dec 2009 16:22:45 +0000 Subject: [PATCH] materials: Get the right blend function for alpha The correct blend function for the alpha channel is: GL_ONE, GL_ONE_MINUS_SRC_ALPHA As per bug 1406. This fix was dropped when the switch to premultiplied alpha was merged. --- cogl/cogl-material.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogl/cogl-material.c b/cogl/cogl-material.c index 1a641a776..6c292ac67 100644 --- a/cogl/cogl-material.c +++ b/cogl/cogl-material.c @@ -106,7 +106,7 @@ _cogl_material_init_default_material (void) #ifndef HAVE_COGL_GLES material->blend_equation_rgb = GL_FUNC_ADD; material->blend_equation_alpha = GL_FUNC_ADD; - material->blend_src_factor_alpha = GL_SRC_ALPHA; + material->blend_src_factor_alpha = GL_ONE; material->blend_dst_factor_alpha = GL_ONE_MINUS_SRC_ALPHA; material->blend_constant[0] = 0; material->blend_constant[1] = 0;