hUI/hui-glium/shaders/fragment.frag

20 lines
415 B
GLSL
Raw Normal View History

2024-02-17 20:43:46 +00:00
#version 300 es
precision highp float;
precision highp sampler2D;
out vec4 out_color;
in vec4 vtx_color;
in vec2 vtx_uv;
2024-02-25 03:02:10 +00:00
uniform sampler2D tex;
2024-02-17 20:43:46 +00:00
void main() {
2024-03-06 20:35:32 +00:00
//HACK: if vtx_uv is (0, 0) then the texture is not used
2024-03-06 20:46:19 +00:00
//disabling this will cause blinking
2024-03-06 20:35:32 +00:00
if (vtx_uv.x == 0.0 && vtx_uv.y == 0.0) {
out_color = vtx_color;
return;
}
2024-02-25 03:02:10 +00:00
out_color = texture(tex, vtx_uv) * vtx_color;
2024-02-17 20:43:46 +00:00
}