gl renderer: Fix coloring shader
authorTimm Bäder <mail@baedert.org>
Mon, 6 May 2019 15:58:55 +0000 (17:58 +0200)
committerTimm Bäder <mail@baedert.org>
Mon, 6 May 2019 15:58:55 +0000 (17:58 +0200)
We *just* pre-multiplied u_color but then didn't use its rgb values.
This fixes backdrop scale marks in Adwaita to not be white.

gsk/resources/glsl/coloring.fs.glsl

index b8aa382eab380b00523c2ec8ee8ec265193a9a27..9de8a13ba7161918c66c530d23ef2ed35105ab0a 100644 (file)
@@ -8,7 +8,8 @@ void main() {
   color.rgb *= color.a;
 
   // u_source is drawn using cairo, so already pre-multiplied.
-  color = vec4(u_color.rgb * diffuse.a * u_alpha, diffuse.a * color.a * u_alpha);
+  color = vec4(color.rgb * diffuse.a * u_alpha,
+               color.a * diffuse.a * u_alpha);
 
   setOutputColor(color);
 }