#version 430 core

layout (location = 0) in vec3 aPos;
layout(location = 3) in mat4 instanceMatrix;

uniform mat4 model;
uniform bool drawingInstanced = false;


void main()
{
    if(drawingInstanced){
        gl_Position = instanceMatrix * model * vec4(aPos, 1.0);
    }
    else{
        gl_Position = model * vec4(aPos, 1.0);
    }
}