
    #version 120 

    #extension GL_EXT_bindable_uniform : enable 

    #extension GL_EXT_gpu_shader4 : enable 
#define tex2D texture2D



varying vec3 normal;
varying vec3 normalB;
varying vec2 texture_coordinate_1; 
//varying vec3 vertex_to_light_vector;
varying vec4 position;
				uniform float PosY;
				uniform float ttime;
varying vec4 projection_position;

uniform mat4 ProjectionMatrix;

varying vec4 ShadowPosZ;
varying vec4 Color;
				uniform sampler2D texture2d_1;
				uniform sampler2D texture2d_2;
				uniform sampler1D textureDSP;
uniform float particlesize;
uniform float magnifier;
uniform float realttime;
varying float rnd;

varying vec2 TheUV;

void main()
{
rnd=1.0;
vec4 glVertex= gl_Vertex;
vec4 glVertexTemp=gl_Vertex;

float Displacement;


Displacement=0.0+texture2D (texture2d_1,glVertex.xy+vec2 (realttime*0.01,0.0)).x*0.5;
Displacement*=pow(texture2D (texture2d_1,glVertex.xy*0.02+vec2 (realttime*0.004,0.0)).x,6.0)*6.4;
Displacement+=0.08*sin(length (glVertex.xy*14.0)+realttime*2.0);
//*10.2*pow(clamp (1.001*sin(4.0*0.01+4.7*0.2+(1.0/2.5)*ttime*2.0*3.1416),0.0,1.0),18.0);


Displacement=texture2D (texture2d_2,glVertex.xy*1.0).x*10.0;


Color=vec4 (0.0+texture2D (texture2d_1,glVertex.xy*0.3+vec2 (ttime*0.0,0.0)).y);

float Cll=texture2D (texture2d_1,glVertex.xy*1.7+vec2 (realttime*0.008,0.0)).x;
Cll=pow(1.8*Cll,5.0)*1.3+1.3;


float Cll2=texture2D (texture2d_1,glVertex.xy*0.9+vec2 (realttime*0.003,0.0)).x;
Cll2=pow (1.8*Cll2,9.0);

Color=vec4 (0.8,0.5,0.3,1.0)*vec4 (texture2D (texture2d_2,glVertex.xy).x)*0.8*Cll;
Color+=vec4 (0.8,0.9,1.3,1.0)*Cll2*vec4 (texture2D (texture2d_2,glVertex.xy).x);

if (ttime>100.0) {

Color=vec4 (0.3,0.5,0.8,1.0)*vec4 (texture2D (texture2d_2,glVertex.xy).x)*0.8*Cll;
Color+=vec4 (0.8,0.9,1.3,1.0)*Cll2*vec4 (texture2D (texture2d_2,glVertex.xy).x);


}
//Cll=1.0;
Cll+=Cll2*0.2;

//Color=vec4 (0.5)*PosY;
if (ttime<100.0) { 
glVertex.y-=ttime*0.11+0.1*2.8;
//*texture2D (texture2d_1,glVertex.xy*0.5).x+0.1;
glVertex.y=mod(glVertex.y,1.0);
glVertex.xy*=80.0; glVertex.xy-=vec2 (40.0);
glVertex.xy*=0.25;
glVertex.x*=-1.0;
glVertex.y*=-1.0;
glVertex.z=0.0;


float Cll3=texture2D (texture2d_1,glVertex.xy*0.13+vec2 (-realttime*0.0,0.0)).x;
Cll3=pow (1.7*Cll3,2.0);
float fss=(ttime-10.0-Cll3*3.0-pow((0.0+glVertexTemp.x),1.0)*1.5)*0.35;
fss=1.0-clamp (fss,0.0,1.0);

Cll3=texture2D (texture2d_1,glVertex.xy*0.23+vec2 (-realttime*0.0,0.0)).x;
Cll3=pow (1.9*Cll3,2.0);

float fss2=(ttime-16.0-Cll3*2.0-glVertexTemp.x*2.0)*0.22;
fss2=clamp (fss2,0.0,1.0);
//fss+=fss2;
//fss=0.0;
glVertex.y+=(-25.0-glVertex.y)*fss*1.0;
glVertex.y+=(25.0-glVertex.y)*fss2*1.0;
glVertex.x+=8.8;

}
else

{ 
glVertex.y-=ttime*0.0;
//*texture2D (texture2d_1,glVertex.xy*0.5).x+0.1;
glVertex.y=mod(glVertex.y,1.0);
glVertex.xy*=80.0; glVertex.xy-=vec2 (40.0);
glVertex.xy*=0.25;
glVertex.x*=-1.0;
glVertex.y*=-1.0;

float t=glVertex.z;
glVertex.z=glVertex.x;
glVertex.x=t;
rnd=10000.0;
glVertex.x+=0.0+10.0;

glVertex.z+=(ttime-205.0)*1.2+5.0*(-2.7);

float Cll3=texture2D (texture2d_1,glVertexTemp.xy*0.63+vec2 (-realttime*0.0,0.0)).x;
Cll3=pow (1.7*Cll3,2.0);
float Cll3n=texture2D (texture2d_1,glVertexTemp.xy*0.23+vec2 (-realttime*0.0,0.0)).x;
Cll3n=0.1+pow(Cll3n,4.0)*6.0;

float fss=(ttime-206.9-Cll3*5.0-pow((0.0+glVertexTemp.y),1.0)*6.0)*1.45*Cll3n;
fss=1.0-clamp (fss,0.0,1.0);


float fss2=(ttime-218.9-Cll3*5.0-pow((0.0+glVertexTemp.y),1.0)*3.0)*0.35*Cll3n;
fss2=clamp (fss2,0.0,1.0);

Cll3=texture2D (texture2d_1,glVertex.xy*0.23+vec2 (-realttime*0.0,0.0)).x;
Cll3=pow (1.9*Cll3,2.0);


fss-=fss2;
//Color=vec4 (1.0);
//Cll=2.0;

//fss+=fss2;
//fss=0.0;

float ThePos=30.0*texture2D (texture2d_1,glVertexTemp.xy*0.55+vec2 (-realttime*0.0,0.0)).x;
glVertex.z+=(-25.0-ThePos-glVertex.z)*fss*1.0;
float ThePos2=-0.3+texture2D (texture2d_1,glVertexTemp.xy*0.55+vec2 (-realttime*0.0,0.0)).x;
glVertex.y+=(100.0*ThePos2-glVertex.x)*fss*1.0;

//glVertex.z+=(25.0-glVertex.z)*fss2*1.0;
//glVertex.x+=8.8;

}









//glVertex.z+=PosY*100.0;
glVertex= gl_TextureMatrix[0] * glVertex;

gl_Position =  glVertex;

TheUV=gl_MultiTexCoord0.st;
//vec2 TheUV1=gl_Vertex.xy*0.03;
//TheUV1=gl_MultiTexCoord0.st*3.0;
//Color=vec4 (1.0);
gl_Position = gl_ModelViewProjectionMatrix * gl_Position;
//rnd=gl_Color.r;
position=gl_Position;
Cll*=1.0;
//*Cll;
Color*=1.0;
if (ttime<100.0)
Color*=1.0-clamp ((ttime-16.0)*0.25,0.0,1.0);
//Cll*=PosY;
//rnd=1000000.0;
//float ff=Color.x;Color.x=Color.z;Color.z=ff;
//swap (Color.x,Color.z);
//Cll=2.0;
//	gl_PointSize =1-7.0/gl_Position.w;
	gl_PointSize =Cll*particlesize*125.0/gl_Position.w;
	//gl_PointSize =particlesize*125.0/gl_Position.w;
	///gl_Position.w;

}











