#version 330 core

//uniforms are data sent to the GPU
uniform vec2 ViewPortSize;

layout (location = 0) in vec3 vposition;
layout (location = 1) in vec4 vcolor;

out vec4 color;
//out vec2 pos;


void main() {
    // needs to be position not (out position) for fancy GL reasons, but it does work still
    float realX = vposition.x / ViewPortSize.x;
    float realY = vposition.y / ViewPortSize.y;
    
    //pos = vec2(realX, realY);
    
    gl_Position = vec4(realX, realY, 0, 1);
    
    //passes sent in color data to the fragment shader
    color = vcolor;
}