#version 410 core
// Unskinned glTF world prop (currently the SunCountry Bus landmark). Node
// transforms are baked into the vertices at load, so a single placement matrix
// positions the whole model. Per-vertex colour carries the glTF material tint.
layout(location = 0) in vec3 aPos;
layout(location = 1) in vec3 aNormal;
layout(location = 2) in vec4 aColor;

uniform mat4 uMVP;     // viewProj * placement (clip-space transform)
uniform mat4 uModel;   // placement only (world normals + fog distance)
uniform vec3 uCamPos;

out vec3  vNormal;
out vec4  vColor;
out float vDist;
out vec3  vWorld;

void main() {
    vec4 wp = uModel * vec4(aPos, 1.0);
    vNormal = mat3(uModel) * aNormal;
    vColor  = aColor;
    vDist   = length(wp.xyz - uCamPos);
    vWorld  = wp.xyz;
    gl_Position = uMVP * vec4(aPos, 1.0);
}
