Put text on the top faces of cubes.
[mandelwow.git] / shaders / text.frag
1 #version 140
2 uniform sampler2D tex;
3 uniform vec4 bgcolor;
4 uniform vec4 fgcolor;
5
6 in vec2 v_tex_coords;
7 out vec4 f_color;
8
9 void main() {
10     f_color = texture(tex, v_tex_coords).x == 0U ? bgcolor : fgcolor;
11 }