diff --git a/src/compositor/mutter/mutter-shaped-texture.c b/src/compositor/mutter/mutter-shaped-texture.c index ef78e25c7..9a91150bb 100755 --- a/src/compositor/mutter/mutter-shaped-texture.c +++ b/src/compositor/mutter/mutter-shaped-texture.c @@ -283,8 +283,7 @@ mutter_shaped_texture_paint (ClutterActor *actor) priv->material = cogl_material_new (); cogl_material_set_layer_combine (priv->material, 1, - "RGB = REPLACE (PREVIOUS)" - "A = MODULATE (PREVIOUS, TEXTURE)", + "RGBA = MODULATE (PREVIOUS, TEXTURE[A])", NULL); } material = priv->material; @@ -305,9 +304,12 @@ mutter_shaped_texture_paint (ClutterActor *actor) { material = priv->material_workaround = cogl_material_new (); + cogl_material_set_layer_combine (material, 0, + "RGB = MODULATE (TEXTURE, PREVIOUS)" + "A = REPLACE (PREVIOUS)", + NULL); cogl_material_set_layer_combine (material, 1, - "RGB = REPLACE (PREVIOUS)" - "A = MODULATE (PRIMARY, TEXTURE)", + "RGBA = MODULATE (PREVIOUS, TEXTURE[A])", NULL); } @@ -320,8 +322,8 @@ mutter_shaped_texture_paint (ClutterActor *actor) { CoglColor color; - cogl_color_set_from_4ub (&color, 255, 255, 255, - clutter_actor_get_paint_opacity (actor)); + guchar opacity = clutter_actor_get_paint_opacity (actor); + cogl_color_set_from_4ub (&color, opacity, opacity, opacity, opacity); cogl_material_set_color (material, &color); } diff --git a/src/compositor/mutter/tidy/tidy-texture-frame.c b/src/compositor/mutter/tidy/tidy-texture-frame.c index 28ca96ac3..879cb6104 100644 --- a/src/compositor/mutter/tidy/tidy-texture-frame.c +++ b/src/compositor/mutter/tidy/tidy-texture-frame.c @@ -210,7 +210,7 @@ tidy_texture_frame_paint (ClutterActor *self) g_assert (priv->material != COGL_INVALID_HANDLE); /* set the source material using the parent texture's COGL handle */ - cogl_material_set_color4ub (priv->material, 255, 255, 255, opacity); + cogl_material_set_color4ub (priv->material, opacity, opacity, opacity, opacity); cogl_material_set_layer (priv->material, 0, cogl_texture); cogl_set_source (priv->material);