mirror of
https://github.com/alacritty/alacritty.git
synced 2024-10-13 05:16:48 -04:00
ed7aa96907
Per-instanced data was previously stored in uniforms. This required several OpenGL calls to upload all of the data, and it was more complex to prepare (several vecs vs one). Additionally, drawing APIs are now accessible through a `RenderApi` (obtained through `QuadRenderer::with_api`) which enables some RAII patterns. Specifically, checks for batch flushing are handled in Drop.
14 lines
276 B
GLSL
14 lines
276 B
GLSL
#version 330 core
|
|
in vec2 TexCoords;
|
|
in vec3 fg;
|
|
|
|
layout(location = 0, index = 0) out vec4 color;
|
|
layout(location = 0, index = 1) out vec4 alphaMask;
|
|
|
|
uniform sampler2D mask;
|
|
|
|
void main()
|
|
{
|
|
alphaMask = vec4(texture(mask, TexCoords).rgb, 1.0);
|
|
color = vec4(fg, 1.0);
|
|
}
|