#version 450
#extension GL_ARB_separate_shader_objects : enable

layout(location = 0) out vec4 outColour;
layout(location = 1) out vec4 pickOutColour;
layout(location = 1) in vec2 fragTexCoord;
layout(location = 2) in vec3 extraColour;
layout(set = 1, binding = 1) uniform sampler2D texSampler;

layout(binding = 0) uniform UniformBufferObject {
    mat4 model;
    mat4 view;
    mat4 proj;
} ubo;

layout(location = 0) in vec3 fragColour;

void main() {
    // regular render output
    outColour = vec4(texture(texSampler, fragTexCoord).rgb, 1.0);

    // pure (selection) colour-only output used for picking objects
    pickOutColour = vec4(extraColour, 1.0);
}
