// Copyright 2006-2010 (C) - Frictional Games
//
// This file is part of HPL1 Engine
//
// For conditions of distribution and use, see copyright notice in LICENSE-shaders
//

///////////////////////////////////////////////////////
/// REFRACTION VERTEX PROGRAM ////////////
///////////////////////////////////////////////////////

vec4 position = gl_Vertex;
vec4 color = gl_Color;
vec2 uv = gl_MultiTexCoord0.xy;
vec3 normal = gl_Normal;

out vec4 vColor;
out vec2 vUv;
out vec3 vNormal;
out vec3 vEyePos;

uniform vec3 EyePos;
uniform mat4 worldViewProj;

void main()
{
	gl_Position = (worldViewProj * position);

	vColor = clamp(color, vec4(0.0), vec4(1.0));

	vUv = uv;

	vNormal = normal;

	vEyePos = normalize(EyePos - position.xyz);
}