#version 410 core
layout(location = 0) in vec3 aPos;
layout(location = 1) in vec3 aColor;
uniform mat4 uMVP;
uniform float uSize;
out vec3 vColor;
void main() {
    vColor = aColor;
    vec4 clip = uMVP * vec4(aPos, 1.0);
    gl_Position = clip;
    gl_PointSize = clamp(uSize / max(clip.w, 0.1), 2.0, 24.0);
}
