mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
9c07dcfcee
Former-commit-id: c5e4ccde88d7170db7aa4d3bfce3e0ba1cf5e8c9
23 lines
442 B
GLSL
23 lines
442 B
GLSL
#version 330 core
|
|
|
|
in vec2 f_uv;
|
|
in vec4 f_color;
|
|
flat in uint f_mode;
|
|
|
|
uniform sampler2D u_tex;
|
|
|
|
out vec4 tgt_color;
|
|
|
|
void main() {
|
|
// Text
|
|
if (f_mode == uint(0)) {
|
|
tgt_color = f_color * vec4(1.0, 1.0, 1.0, texture(u_tex, f_uv).a);
|
|
// Image
|
|
} else if (f_mode == uint(1)) {
|
|
tgt_color = f_color * texture(u_tex, f_uv);
|
|
// 2D Geometry
|
|
} else if (f_mode == uint(2)) {
|
|
tgt_color = f_color;
|
|
}
|
|
}
|