1
0
Fork 0
spectre/assets/shaders/text.frag.glsl
2016-01-10 09:26:43 +01:00

13 lines
358 B
GLSL

#version 330 core
uniform sampler2D u_tex0;
in vec2 vTexCoords; // Texture coordinates (normalized)
in vec4 vColor; // Vertex color
out vec4 fragColor; // Output frag color.
void main() {
// Sample texture red component as alpha value.
vec4 sampled = vec4(1.0f, 1.0, 1.0, texture(u_tex0, vTexCoords).r);
fragColor = vColor * sampled;
}