#version 450
layout(location = 0) in vec3 aPos;
layout(location = 1) in vec2 aUV;
layout(location = 2) in float aShade;

layout(std140, binding = 0) uniform Globals {
    mat4  uMVP;
    mat4  uModel;
    int   uTextured;
    float uLayer;
    vec4  uColor;
    vec3  uAccent;
    int   uPattern;
    float uLight;
    vec3  uFog;
    float uFogAmt;
    int   uDynLightCount;
    vec4  uDynLightPosRadius0;
    vec4  uDynLightPosRadius1;
    vec4  uDynLightPosRadius2;
    vec4  uDynLightPosRadius3;
    vec4  uDynLightColor0;
    vec4  uDynLightColor1;
    vec4  uDynLightColor2;
    vec4  uDynLightColor3;
};

layout(location = 0) out vec2 vUV;
layout(location = 1) out float vShade;
layout(location = 2) out vec3 vWorld;

void main() {
    vUV = aUV;
    vShade = aShade;
    vec4 world = uModel * vec4(aPos, 1.0);
    vWorld = world.xyz;
    gl_Position = uMVP * world;
}
