Files
opengl-test/data/glsl/font.frag
T
2021-02-20 01:07:10 +01:00

15 lines
287 B
GLSL

#version 130
in vec2 textCoord;
out vec4 fragColor;
uniform vec3 color;
uniform sampler2D texture1;
void main()
{
// Sample sets the alpha channel to either 0 / 1
vec4 sampled = vec4(1.0f, 1.0f, 1.0f, texture(texture1, textCoord).r);
fragColor = vec4(color, 1.0f) * sampled;
}