Fix white background color not allowing transparency

This commit is contained in:
Luflosi 2019-01-08 16:14:01 +01:00
parent ea37799fb0
commit 490d4455af
No known key found for this signature in database
GPG Key ID: 14140F703B7D8362

View File

@ -101,7 +101,7 @@ void main() {
#else
// SIMPLE
#ifdef TRANSPARENT
final_color = alpha_blend_premul(fg.rgb, fg.a, background, bg_alpha);
final_color = alpha_blend_premul(fg.rgb, fg.a, background * bg_alpha, bg_alpha);
final_color = vec4(final_color.rgb, final_color.a);
#else
// since background alpha is 1.0, it is effectively pre-multiplied