From f858f66fe050459beeb349a4448c165d95de0450 Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Mon, 2 Mar 2015 11:34:40 +0100 Subject: [PATCH] MetaBackgroundActor: glsl: do not mix int and float. Implicit conversion from int to float is not supported by GLSL ES. Fixes: (gnome-shell:8954): Cogl-WARNING **: Shader compilation failed: 1:2: P0004: High precision not supported, instead compiling high precision as medium precision 4:17: S0001: Type mismatch in arithmetic operation between 'int' and 'float' when one trigger the overview mode on Mali 400 r1p1 GPU. https://bugzilla.gnome.org/show_bug.cgi?id=745442 --- src/compositor/meta-background-actor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compositor/meta-background-actor.c b/src/compositor/meta-background-actor.c index abc6fda08..132494d9e 100644 --- a/src/compositor/meta-background-actor.c +++ b/src/compositor/meta-background-actor.c @@ -115,7 +115,7 @@ typedef enum { #define FRAGMENT_SHADER_CODE \ "float t = 2.0 * length(position);\n" \ "t = min(t, 1.0);\n" \ -"float pixel_brightness = 1 - t * vignette_sharpness;\n" \ +"float pixel_brightness = 1.0 - t * vignette_sharpness;\n" \ "cogl_color_out.rgb = cogl_color_out.rgb * pixel_brightness;\n" \ typedef struct _MetaBackgroundLayer MetaBackgroundLayer;