	uniform float Trans;

void main()
{	
vec4 v = vec4(gl_Vertex);		
v.y += sin(v.z*18.0+v.x*10.0+ Trans )*0.3;
v.x += sin(v.z*11.0+v.x*19.0+ Trans )*0.3;
v.z += sin(v.z*13.0+v.x*12.0+ Trans )*0.3;

gl_Position = gl_ModelViewProjectionMatrix * v;	
	
	gl_TexCoord[0] = gl_MultiTexCoord0;
	gl_TexCoord[0].t += Trans;	
	vec3 u = normalize( vec3(gl_ModelViewMatrix * gl_Vertex) );
	vec3 n = normalize( gl_NormalMatrix * gl_Normal );
	vec3 r = reflect( u, n );
	float m = 2.0 * sqrt( r.x*r.x + r.y*r.y + (r.z+1.0)*(r.z+1.0) );
	gl_TexCoord[1].s = r.x/m + 0.5;
	gl_TexCoord[1].t = r.y/m + 0.5;


}