VERTEX
//uniform float blur_range;
varying vec3 a1,a2;
uniform vec4 offset;
uniform float time;
void main()
{

		
	gl_TexCoord[0] = gl_MultiTexCoord0 ;

	gl_Position = ftransform(); 

	vec2 uv2 = gl_TexCoord[0].xy +offset.xy;

	a1.x = uv2.y*67.9 + uv2.x*27.9;
	a1.y = uv2.y*47.5+ uv2.x*17.5;
	a1.z = time * 2.0 + uv2.y*27.5+ uv2.x*7.5 ;
	a2.x = uv2.y*87.9 + uv2.x*27.9;
	a2.y = uv2.y*47.5+ uv2.x*17.5;
	a2.z = time * 1.5 + uv2.y*22.5+ uv2.x*8.5 ;


}
PIXEL
uniform sampler2D tex, tex1;
uniform float time;

uniform float fade;
uniform float uvx, uvy;

varying vec3 a1,a2;
void main()
{
	vec2 uv = gl_TexCoord[0].st;
	
	uv = uv + vec2(sin(a1.x),sin(a1.y))*0.003 * sin(a1.z) + vec2(sin(a2.x),sin(a2.y))*0.003 * sin(a2.z) ;
	vec2 uv3 = uv;
	uv.x*=uvx;
	uv.y*=uvy;

	gl_FragColor =  0.2 * 
(texture2D(tex,uv) 
 + texture2D(tex,uv+ vec2(0.005*uvx,0))
 + texture2D(tex,uv+ vec2(0.0025*uvx,0)) 
+ texture2D(tex,uv- vec2(0.0025*uvx,0))
+ texture2D(tex,uv- vec2(0.005*uvx,0)))+fade 
+ texture2D(tex1,uv3 + vec2(time * 0.1, time*0.08))
+ texture2D(tex1,uv3*1.5 + vec2(time * 0.15, time*0.18));
}
