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
Joe Wilm 30ec145109
Initial support for Terminal Emulation (woo!)
This patch introduces basic support for terminal emulation. Basic means
commands that don't use paging and are not full screen applications like
vim or tmux. Some paging applications are working properly, such as as
`git log`. Other pagers work reasonably well as long as the help menu is
not accessed.

There is now a central Rgb color type which is shared by the renderer,
terminal emulation, and the pty parser.

The parser no longer owns a Handler. Instead, a mutable reference to a
Handler is provided whenever advancing the parser. This resolved some
potential ownership issues (eg parser owning the `Term` type would've
been unworkable).
2016-06-02 19:42:28 -07:00

15 lines
364 B
GLSL

#version 330 core
in vec2 TexCoords;
layout(location = 0, index = 0) out vec4 color;
layout(location = 0, index = 1) out vec4 alphaMask;
uniform sampler2D mask;
uniform ivec3 textColor;
void main()
{
alphaMask = vec4(texture(mask, TexCoords).rgb, 1.0);
vec3 textColorF = vec3(textColor) / vec3(255.0, 255.0, 255.0);
color = vec4(textColorF, 1.0);
}