summaryrefslogtreecommitdiff
path: root/res/text.f.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'res/text.f.glsl')
-rw-r--r--res/text.f.glsl7
1 files changed, 5 insertions, 2 deletions
diff --git a/res/text.f.glsl b/res/text.f.glsl
index dd60333c..5915960f 100644
--- a/res/text.f.glsl
+++ b/res/text.f.glsl
@@ -14,7 +14,7 @@
#version 330 core
in vec2 TexCoords;
in vec3 fg;
-in vec3 bg;
+in vec4 bg;
flat in float vb;
flat in int background;
@@ -27,8 +27,11 @@ uniform sampler2D mask;
void main()
{
if (background != 0) {
+ if (bg.a == 0.0)
+ discard;
+
alphaMask = vec4(1.0);
- color = vec4(bg + vb, 1.0) * bgOpacity;
+ color = vec4(bg.rgb + vb, 1.0);
} else {
vec3 textColor = texture(mask, TexCoords).rgb;
alphaMask = vec4(textColor, textColor.r);