 #version 330

uniform mat4 projectionMatrix; //eye space -> homogenous clip space (-> perspective division -> device coords)
uniform mat4 modelMatrix; 
uniform mat4 viewMatrix; //world space -> eye space
uniform mat4 scale;


in vec4 vertex; //vertexposition
in vec2 textureCoords; 
in vec4 color;


//outs are then in eye space
out vec4 fragmentColor;


void main(void)
{

	mat4 modelViewMatrix = viewMatrix * modelMatrix;

	fragmentColor = color;
	
	gl_Position = projectionMatrix * modelViewMatrix * vertex; //vertex transformation, right transformation happens first

	//for isometric:
	//gl_Position = projectionMatrix * modelViewMatrix * scale * vertex; //vertex transformation, right transformation happens first
}

	
