aboutsummaryrefslogtreecommitdiff
path: root/alacritty/res
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty/res')
-rw-r--r--alacritty/res/text.f.glsl7
-rw-r--r--alacritty/res/text.v.glsl13
2 files changed, 7 insertions, 13 deletions
diff --git a/alacritty/res/text.f.glsl b/alacritty/res/text.f.glsl
index cf477eb0..b051ee8d 100644
--- a/alacritty/res/text.f.glsl
+++ b/alacritty/res/text.f.glsl
@@ -13,9 +13,8 @@
// limitations under the License.
#version 330 core
in vec2 TexCoords;
-flat in vec3 fg;
+flat in vec4 fg;
flat in vec4 bg;
-flat in int colored;
uniform int backgroundPass;
layout(location = 0, index = 0) out vec4 color;
@@ -32,7 +31,7 @@ void main()
alphaMask = vec4(1.0);
color = vec4(bg.rgb, 1.0);
} else {
- if (colored != 0) {
+ if (fg.a != 0.0) {
// Color glyphs, like emojis.
vec4 glyphColor = texture(mask, TexCoords);
alphaMask = vec4(glyphColor.a);
@@ -47,7 +46,7 @@ void main()
// Regular text glyphs.
vec3 textColor = texture(mask, TexCoords).rgb;
alphaMask = vec4(textColor, textColor.r);
- color = vec4(fg, 1.0);
+ color = vec4(fg.rgb, 1.0);
}
}
}
diff --git a/alacritty/res/text.v.glsl b/alacritty/res/text.v.glsl
index 8978c111..d15728dc 100644
--- a/alacritty/res/text.v.glsl
+++ b/alacritty/res/text.v.glsl
@@ -21,19 +21,15 @@ layout (location = 1) in vec4 glyph;
// uv mapping.
layout (location = 2) in vec4 uv;
-// Text fg color.
-layout (location = 3) in vec3 textColor;
+// Text foreground rgb packed together with multicolor flag.
+layout (location = 3) in vec4 textColor;
// Background color.
layout (location = 4) in vec4 backgroundColor;
-// Set to 1 if the glyph colors should be kept.
-layout (location = 5) in int coloredGlyph;
-
out vec2 TexCoords;
-flat out vec3 fg;
+flat out vec4 fg;
flat out vec4 bg;
-flat out int colored;
// Terminal properties
uniform vec2 cellDim;
@@ -74,6 +70,5 @@ void main()
}
bg = vec4(backgroundColor.rgb / 255.0, backgroundColor.a);
- fg = textColor / vec3(255.0, 255.0, 255.0);
- colored = coloredGlyph;
+ fg = vec4(textColor.rgb / 255.0, textColor.a);
}