a_chat_client/shaders/text_atlas_fragment.glsl

19 lines
356 B
GLSL

#version 440 core
struct VertexOutput {
vec4 position;
vec2 tex_coord;
};
layout(location = 0) in VertexOutput out_vertex;
layout(location = 1) uniform highp sampler2D atlas_texture;
out vec4 color;
void main() {
float text_color = texture(atlas_texture, out_vertex.tex_coord).r;
color = vec4(text_color * vec3(1,1,1), text_color);
}