#version 330 core layout (location = 0) in vec3 base_position; uniform float scale; uniform vec4 color; uniform vec3 position; uniform mat4 view; uniform mat4 model; uniform mat4 projection; out vec4 v_color; void main() { vec3 p = base_position + position * scale ; gl_Position = projection * view * vec4(p, 1.0); v_color = color; }