uniform vec3 spherePos;
uniform float anim;
void main()
{
vec4 posMod;

 vec3 spherePosV = vec3(vec4(spherePos,1.0));
 vec4 varyEyeVecMs = gl_Vertex;
 float rad = 130.0;
 vec3 delta = spherePosV - varyEyeVecMs.xyz;
 float dis = abs(dot(delta,delta));
 float doIt=1.0;
  float lengi = length(gl_Vertex);
  posMod.x = sin(anim + lengi*0.3)*(anim + dis)*0.002;
  	posMod.y = sin(anim + pow(lengi*0.3,2.0))*(anim + 130.0 - dis)*0.002;
	posMod.z = sin(anim + lengi*0.332)*(anim + 130.0 - dis)*0.002;
	posMod.w=0.0;

 posMod+=gl_Vertex;
 posMod = gl_ModelViewMatrix*posMod;
 if(dis<pow(rad,2.0))
	doIt=1.0;
 else
	doIt=1000.0;
 gl_Position = gl_ProjectionMatrix * vec4(posMod.xyz*doIt,posMod.w);

}