mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-02 04:37:54 +08:00
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.
12 lines
236 B
GLSL
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;
|
|
} |