#version 130

uniform vec3 sunPosition;
uniform vec3 playerPos;
uniform vec3 playerLookAtDir;

in vec3 vPosition;

out vec3 fWorldPos;
out float playerLookingAtSun;	// the dot of the player looking at the sun - should be the same for all verts

float tween(float t)
{
	return clamp(t*t*t*(t*(t*6-15)+10),0,1);
}


void main()
{		
	//float dotPS = max(0.0, dot(playerLookAtDir, normalize(sunPosition - playerPos)));
	playerLookingAtSun = 0.8;
	fWorldPos = vPosition + playerPos;
	gl_Position = gl_ModelViewProjectionMatrix * vec4(fWorldPos, 1);
}
