gtk2/gsk/resources/glsl/shadow.fs.glsl
Timm Bäder eb221ff305 gl renderer: Only take glyph texture alpha into account
This way, we can use the very same coloring program to draw text shadows
of fonts with colored glyphs.
2017-12-21 19:12:32 +01:00

14 lines
256 B
GLSL

uniform vec4 u_color;
void main() {
vec4 diffuse = Texture(u_source, vUv);
vec4 color = u_color;
// pre-multiply
color.rgb *= color.a;
color = vec4(u_color.rgb * diffuse.a * u_alpha, diffuse.a * color.a * u_alpha);
setOutputColor(color);
}