#version 330 core

uniform vec2 resolution;
uniform float time;
uniform vec2 camera;

layout(location = 0) in vec2 pos;
layout(location = 1) in vec4 color;
layout(location = 2) in vec2 uv;


vec2 project_point(vec2 point)
{
  return (2.0 * (point - camera)) / resolution;
}

out vec4 out_color;

void main() {
	gl_Position = vec4(project_point(pos), 0, 1);
	out_color = color;
}
