#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 mapFactor = 1.0f;
uniform float terrainFactor1 = 1.0f;
uniform float terrainFactor2 = 1.0f;

out vec3 pixelPosition;	
out vec3 pixelNormal;
out vec2 mapTexCoord;
out vec2 terrainCoord1;
out vec2 terrainCoord2;

void main()
{
	pixelPosition = inPosition;
	pixelNormal = inNormCoord;
	mapTexCoord = mapFactor * inTexCoord;
	terrainCoord1 = terrainFactor1 * inTexCoord;
	terrainCoord2 = terrainFactor2 * inTexCoord;
	gl_Position = matrices.projMatrix * matrices.modelViewMatrix * vec4(inPosition, 1.0f);
}