mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
20 lines
381 B
GLSL
20 lines
381 B
GLSL
#version 330 core
|
|
|
|
in vec2 glyph_tex_coords;
|
|
|
|
/// The background color for this cell.
|
|
flat in vec4 bg_color;
|
|
|
|
/// Font texture
|
|
uniform sampler2D text;
|
|
|
|
void main() {
|
|
int background = 0;
|
|
if (background == 1) {
|
|
gl_FragColor = bg_color;
|
|
} else {
|
|
float a = texture(text, glyph_tex_coords).r;
|
|
gl_FragColor = vec4(bg_color.rgb, bg_color.a*a);
|
|
}
|
|
}
|