#version 400 core

// Structure for matrices
uniform struct Matrices
{
	mat4 projMatrix;
	mat4 modelViewMatrix; 
} matrices;

// Layout of vertex attributes in VBO
layout (location = 0) in vec3 inPosition;
layout (location = 1) in vec2 inTexCoord;
layout (location = 2) in vec3 inNormCoord;

// parameter for scaling tiling in x direction 
uniform float tileFactor = 1.0f;

out vec3 pixelPosition;	
out vec3 pixelNormal;
out vec2 processedTexCoord;

void main()
{
	pixelPosition = inPosition;
	pixelNormal = inNormCoord;
	processedTexCoord = vec2(inTexCoord.x * tileFactor, inTexCoord.y);
	gl_Position = matrices.projMatrix * matrices.modelViewMatrix * vec4(inPosition, 1.0f);
}