varying float light_diffuse;
uniform float timer;
varying float alpha;

void main(void)
{
	gl_TexCoord[0] = gl_MultiTexCoord0;
	vec4 pos = gl_Vertex;

	vec3 light = vec3(1.0, 1.0, 0.0);
	light = normalize(light);
	light_diffuse = clamp(dot(gl_Normal, light), 0.0, 1.0);	

       	pos.z +=  pow(pos.y, 3.0) * sin((timer * 0.2 + pos.z * 2.0)) * 0.1;

	vec4 propos = gl_ModelViewMatrix * pos;

	alpha = clamp(1.0 - pow(length(vec3(propos.xyz)), 3.0) * 0.5, 0.0, 1.0);

	gl_Position = gl_ModelViewProjectionMatrix * pos;
	

		

}