Shader "QO/Effect/Ripple" {
Properties {
 _tex0 ("_tex0  : Original  Image (RGBA)", 2D) = "white" {}
 _tex1 ("_tex1  : Transform Image (RGBA)", 2D) = "white" {}
 _time ("_time  : time rate", Range(0,1)) = 0
 _pow ("_pow   : screen wave power", Float) = 2
 _w ("_w     : ripple wave width", Float) = 1.5
 _h ("_h     : ripple wave height", Float) = 5
 _speed ("_speed : ripple wave speed", Float) = 2
}
SubShader { 
 LOD 200
 Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
 Pass {
  Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
  Blend SrcAlpha OneMinusSrcAlpha
Program "vp" {
SubProgram "gles " {
"!!GLES


#ifdef VERTEX

varying mediump vec2 xlv_TEXCOORD0;
varying lowp vec4 xlv_COLOR0;
uniform highp mat4 glstate_matrix_mvp;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesVertex;
void main ()
{
  mediump vec2 tmpvar_1;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  tmpvar_1 = tmpvar_2;
  gl_Position = (glstate_matrix_mvp * _glesVertex);
  xlv_COLOR0 = vec4(1.0, 1.0, 1.0, 1.0);
  xlv_TEXCOORD0 = tmpvar_1;
}



#endif
#ifdef FRAGMENT

varying mediump vec2 xlv_TEXCOORD0;
uniform mediump float _speed;
uniform mediump float _w;
uniform mediump float _h;
uniform mediump float _pow;
uniform mediump float _time;
uniform sampler2D _tex1;
uniform sampler2D _tex0;
void main ()
{
  lowp float check2_1;
  lowp float check1_2;
  mediump vec2 tmpvar_3;
  tmpvar_3.x = (xlv_TEXCOORD0.x - 0.5);
  tmpvar_3.y = ((xlv_TEXCOORD0.y - 0.5) * 0.5625);
  mediump float tmpvar_4;
  tmpvar_4 = (_time * _speed);
  mediump float tmpvar_5;
  tmpvar_5 = sqrt(dot (tmpvar_3, tmpvar_3));
  mediump float tmpvar_6;
  tmpvar_6 = (tmpvar_4 - (_w * 0.01));
  mediump float tmpvar_7;
  tmpvar_7 = ((_time - 0.25) * _speed);
  mediump float tmpvar_8;
  tmpvar_8 = sqrt(dot (tmpvar_3, tmpvar_3));
  mediump float tmpvar_9;
  tmpvar_9 = (tmpvar_7 - (_w * 0.01));
  mediump float tmpvar_10;
  tmpvar_10 = ((_time - 0.5) * _speed);
  mediump float tmpvar_11;
  tmpvar_11 = sqrt(dot (tmpvar_3, tmpvar_3));
  mediump float tmpvar_12;
  tmpvar_12 = (tmpvar_10 - (_w * 0.01));
  mediump float tmpvar_13;
  tmpvar_13 = ((_time - 0.75) * _speed);
  mediump float tmpvar_14;
  tmpvar_14 = sqrt(dot (tmpvar_3, tmpvar_3));
  mediump float tmpvar_15;
  tmpvar_15 = (tmpvar_13 - (_w * 0.01));
  mediump float tmpvar_16;
  tmpvar_16 = (1.0 - _time);
  mediump vec2 tmpvar_17;
  tmpvar_17 = ((((((tmpvar_3 * ((sin((((tmpvar_4 - tmpvar_5) / (tmpvar_4 - tmpvar_6)) * 3.14159)) * _h) * 0.02)) * float(((float(((tmpvar_5 - tmpvar_6) >= 0.0)) + float(((tmpvar_4 - tmpvar_5) >= 0.0))) >= 2.0))) + ((tmpvar_3 * ((sin((((tmpvar_7 - tmpvar_8) / (tmpvar_7 - tmpvar_9)) * 3.14159)) * _h) * 0.02)) * float(((float(((tmpvar_8 - tmpvar_9) >= 0.0)) + float(((tmpvar_7 - tmpvar_8) >= 0.0))) >= 2.0)))) + ((tmpvar_3 * ((sin((((tmpvar_10 - tmpvar_11) / (tmpvar_10 - tmpvar_12)) * 3.14159)) * _h) * 0.02)) * float(((float(((tmpvar_11 - tmpvar_12) >= 0.0)) + float(((tmpvar_10 - tmpvar_11) >= 0.0))) >= 2.0)))) + ((tmpvar_3 * ((sin((((tmpvar_13 - tmpvar_14) / (tmpvar_13 - tmpvar_15)) * 3.14159)) * _h) * 0.02)) * float(((float(((tmpvar_14 - tmpvar_15) >= 0.0)) + float(((tmpvar_13 - tmpvar_14) >= 0.0))) >= 2.0)))) * tmpvar_16);
  mediump vec2 tmpvar_18;
  tmpvar_18 = (xlv_TEXCOORD0 + (((tmpvar_3 * (sin((50.2654 * (sqrt(dot (tmpvar_3, tmpvar_3)) * _time))) * (_pow * 0.01))) * tmpvar_16) + tmpvar_17));
  mediump float tmpvar_19;
  tmpvar_19 = float((-0.01 >= (xlv_TEXCOORD0.y + tmpvar_17.y)));
  check1_2 = tmpvar_19;
  mediump float tmpvar_20;
  tmpvar_20 = float((-0.01 >= (1.0 - (xlv_TEXCOORD0.y + tmpvar_17.y))));
  check2_1 = tmpvar_20;
  lowp float tmpvar_21;
  tmpvar_21 = float((0.0 >= (check1_2 + check2_1)));
  lowp vec4 tmpvar_22;
  tmpvar_22 = texture2D (_tex0, tmpvar_18);
  mediump vec4 tmpvar_23;
  tmpvar_23.xyz = tmpvar_22.xyz;
  tmpvar_23.w = (1.0 - _time);
  lowp vec4 tmpvar_24;
  tmpvar_24 = texture2D (_tex1, tmpvar_18);
  mediump vec4 tmpvar_25;
  tmpvar_25.xyz = tmpvar_24.xyz;
  tmpvar_25.w = (1.0 - tmpvar_23.w);
  mediump vec4 tmpvar_26;
  tmpvar_26.xyz = (((tmpvar_23.xyz * tmpvar_23.w) + (tmpvar_25.xyz * tmpvar_25.w)) * tmpvar_21);
  tmpvar_26.w = (tmpvar_23.w + tmpvar_25.w);
  gl_FragData[0] = tmpvar_26;
}



#endif"
}
}
Program "fp" {
SubProgram "gles " {
"!!GLES"
}
}
 }
}
Fallback "VertexLit"
}