kubi/kubi-ui-glium/shaders/fragment.frag

22 lines
372 B
GLSL
Raw Normal View History

2023-11-22 04:56:46 -06:00
#version 300 es
precision highp float;
precision highp sampler2D;
2023-11-22 11:40:35 -06:00
2023-11-22 04:56:46 -06:00
out vec4 out_color;
2023-11-22 11:40:35 -06:00
in vec4 vtx_color;
in vec2 vtx_uv;
uniform bool use_tex;
uniform sampler2D tex;
2023-11-22 04:56:46 -06:00
void main() {
//if (vtx_color.w <= 0.) discard;
vec4 tex_color;
if (use_tex) {
tex_color = texture(tex, vtx_uv);
} else {
tex_color = vec4(1.);
}
out_color = tex_color * vtx_color;
2023-11-22 04:56:46 -06:00
}