Files
LearnOpenGL/src/7.in_practice/3.2d_game/text_2d.fs
rich_b 5d919242f1 move shaders up a level, running cmake won't copy the shaders in
a sub folder into the bin folders.  Rename four files from *.frag
to *.fs, to be consistent with the rest of the examples.
Renamed text.* to text_2d.*, so they won't conflict or overwrite
the text.* files under text_rendering example.
2020-06-24 15:41:26 -04:00

12 lines
236 B
GLSL

#version 330 core
in vec2 TexCoords;
out vec4 color;
uniform sampler2D text;
uniform vec3 textColor;
void main()
{
vec4 sampled = vec4(1.0, 1.0, 1.0, texture(text, TexCoords).r);
color = vec4(textColor, 1.0) * sampled;
}