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.
This commit is contained in:
Timm Bäder 2017-12-09 18:31:28 +01:00
parent 075e6ac266
commit eb221ff305
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,3 @@
uniform vec4 u_color;
void main() {
@ -8,5 +7,7 @@ void main() {
// pre-multiply
color.rgb *= color.a;
setOutputColor((diffuse * color) * u_alpha);
color = vec4(u_color.rgb * diffuse.a * u_alpha, diffuse.a * color.a * u_alpha);
setOutputColor(color);
}

View File

@ -7,7 +7,7 @@ void main() {
// pre-multiply
color.rgb *= color.a;
color = vec4(u_color.rgb * diffuse.a, diffuse.a * color.a);
color = vec4(u_color.rgb * diffuse.a * u_alpha, diffuse.a * color.a * u_alpha);
setOutputColor(color);
}