#version 450

layout(location = 0) in vec3 iColor;
layout(location = 2) in vec2 iFragTexCoord;

layout(location = 0) out vec4 oColor;

layout(binding = 2) uniform sampler2D textureSampler;

void main() {
    // oColor = texture(textureSampler, iFragTexCoord);
    // return;

    if (iColor.r != 0.0 || iColor.g != 0.0 || iColor.b != 0.0) {
        oColor = vec4(iColor, 1);
        return;
    }
    oColor = texture(textureSampler, iFragTexCoord);
}