#version 450
layout(location = 0) in vec2 vUV;

layout(std140, binding = 0) uniform Globals {
    mat4  uVP;
    vec3  uOffset;
    float uLayer;
};
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.04) discard;
    FragColor = vec4(0.04, 0.03, 0.03, t.a);
}
