//varying float 	h;
//varying	vec3	cnormal;
//attribute vec3 	normal;	
//varying float	depth;
uniform float 		sunpower;
varying vec2 		texcoord,
					texcoord1;
varying float		depth;
varying vec3		pos;
uniform vec2		ofs;
varying vec3		eyepos;

uniform vec4 		sunpos;
varying vec3		suneyedir;

void main()
{
	gl_Position = ftransform();
	/*h=( 1.0 - clamp(gl_Vertex.y*0.005,0.0,1.0) )*sunpower;
	cnormal.xyz=-gl_Vertex.xyz;
	depth=length(gl_Vertex);*/
	texcoord = gl_MultiTexCoord0.st*15.0 + ofs;
	texcoord1 = gl_MultiTexCoord0.st*7.0 + vec2(0.5,0.5);
	depth=gl_Position.z;
	pos=gl_Vertex.xyz;
	eyepos=(gl_ModelViewMatrix*gl_Vertex).xyz;
	suneyedir=normalize((gl_ModelViewMatrix*sunpos).xyz);
}