mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-12-22 20:28:21 -06:00
20 lines
415 B
GLSL
20 lines
415 B
GLSL
#version 300 es
|
|
|
|
precision highp float;
|
|
precision highp sampler2D;
|
|
|
|
out vec4 out_color;
|
|
in vec4 vtx_color;
|
|
in vec2 vtx_uv;
|
|
uniform sampler2D tex;
|
|
|
|
void main() {
|
|
//HACK: if vtx_uv is (0, 0) then the texture is not used
|
|
//disabling this will cause blinking
|
|
if (vtx_uv.x == 0.0 && vtx_uv.y == 0.0) {
|
|
out_color = vtx_color;
|
|
return;
|
|
}
|
|
out_color = texture(tex, vtx_uv) * vtx_color;
|
|
}
|