1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-10-13 05:16:48 -04:00
alacritty/res/text.f.glsl
2016-06-06 16:54:15 -07:00

22 lines
444 B
GLSL

#version 330 core
in vec2 TexCoords;
in vec3 fg;
in vec3 bg;
flat in int background;
layout(location = 0, index = 0) out vec4 color;
layout(location = 0, index = 1) out vec4 alphaMask;
uniform sampler2D mask;
void main()
{
if (background != 0) {
alphaMask = vec4(1.0, 1.0, 1.0, 1.0);
color = vec4(bg, 1.0);
} else {
alphaMask = vec4(texture(mask, TexCoords).rgb, 1.0);
color = vec4(fg, 1.0);
}
}