#version 460

// uniforms
uniform sampler2D tex;

// interpolated inputs
in vec2 tc;

// output
out vec4 color;

void main() {

    int res = int(textureQueryLod(tex,tc).x);

    if (res == 0)
        color = vec4(1,0,0,0);
    else if (res == 1)
        color = vec4(0,1,0,0);
    else if (res == 2)
        color = vec4(0,0,1,0);
    else if (res == 3)
        color = vec4(0,1,1,0);
    else if (res == 4)
        color = vec4(1,0,1,0);
    else if (res == 5)
        color = vec4(1,1,0,0);
    else
        color = vec4(1,1,1,0);
}