18 lines
343 B
GLSL
18 lines
343 B
GLSL
#version 330 core
|
|
|
|
out vec4 color;
|
|
|
|
in VS_OUT {
|
|
vec2 texuv;
|
|
flat int index;
|
|
} fs_in;
|
|
|
|
uniform sampler2DArray text;
|
|
uniform int letter_map[400];
|
|
uniform vec3 text_color;
|
|
|
|
void main()
|
|
{
|
|
vec4 sampled = vec4(1.0, 1.0, 1.0, texture(text, vec3(fs_in.texuv.xy, letter_map[fs_in.index])).r);
|
|
color = vec4(text_color, 1.0) * sampled;
|
|
}
|