#version 330 core

in vec2 position;

out vec3 color;

const float noteWidth = 1.0 / 64.0;

uniform vec3 baseColor;
uniform vec2 pos;

void main(void){
	
	gl_Position = vec4(position + pos, 0.0, 1.0);
	color = vec3((noteWidth - position.x + (noteWidth / 2.0)) * (baseColor.x / noteWidth), (noteWidth - position.x + (noteWidth / 2.0)) * (baseColor.y / noteWidth), (noteWidth - position.x + (noteWidth / 2.0)) * (baseColor.z / noteWidth));
	
}