#version 450
layout(location = 0) in vec2 vUV;
layout(std140, binding = 0) uniform Globals {
    mat4  uProj;
    float uLayer;
    float uShade;
    vec4  uTint;
};
layout(binding = 1) uniform sampler2DArray uAtlas;
layout(location = 0) out vec4 FragColor;
void main() {
    vec4 t = texture(uAtlas, vec3(vUV, uLayer));
    if (t.a < 0.02) discard;
    FragColor = vec4(t.rgb * uShade * uTint.rgb, t.a * uTint.a);
}
