summaryrefslogtreecommitdiff
path: root/text_rendering/glyph.frag
blob: a6fae4bd198fca692769e0c5996db9334a792622 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#version 330 core

in vert_t {
	vec2 tex_coords;
} vert;

out vec4 frag_color;

uniform sampler2D glyph;
uniform vec3 text_color;

void main()
{
	vec4 glyph_color = vec4(1.0, 1.0, 1.0, texture(glyph, vert.tex_coords).r);
	frag_color = vec4(text_color, 1.0) * glyph_color;
}