Shader "QO/Effect/Wave" {
Properties {
 _tex0 ("_tex0  : Original Image (RGBA)", 2D) = "white" {}
 _tex1 ("_tex1  : Transform Image (RGBA)", 2D) = "white" {}
 _power ("_power : Wave Power", Float) = 0
 _count ("_count : Go Return Count", Float) = 0
 _time ("_time  : Time Rate (0 to 1)", Range(0,1)) = 0
}
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 lowp vec2 xlv_TEXCOORD0;
varying lowp vec4 xlv_COLOR0;
uniform highp mat4 glstate_matrix_mvp;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesVertex;
void main ()
{
  lowp 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 lowp vec2 xlv_TEXCOORD0;
uniform highp float _time;
uniform highp float _count;
uniform highp float _power;
uniform sampler2D _tex1;
uniform sampler2D _tex0;
void main ()
{
  mediump vec4 t0_1;
  lowp float check2_2;
  lowp float check1_3;
  mediump float wave_4;
  mediump float theta_5;
  mediump float sin_omega_6;
  highp float tmpvar_7;
  tmpvar_7 = sin((_time * 3.14159));
  sin_omega_6 = tmpvar_7;
  highp float tmpvar_8;
  tmpvar_8 = (((sin_omega_6 * 3.14159) * (_count * 2.0)) * (0.5 - xlv_TEXCOORD0.y));
  theta_5 = tmpvar_8;
  mediump float tmpvar_9;
  tmpvar_9 = cos(theta_5);
  highp float tmpvar_10;
  tmpvar_10 = ((tmpvar_9 * sin_omega_6) * _power);
  wave_4 = tmpvar_10;
  mediump float tmpvar_11;
  tmpvar_11 = (xlv_TEXCOORD0.x + wave_4);
  mediump vec2 tmpvar_12;
  tmpvar_12.x = tmpvar_11;
  tmpvar_12.y = xlv_TEXCOORD0.y;
  mediump float tmpvar_13;
  tmpvar_13 = float((-0.01 >= tmpvar_11));
  check1_3 = tmpvar_13;
  mediump float tmpvar_14;
  tmpvar_14 = float((-0.01 >= (1.0 - tmpvar_11)));
  check2_2 = tmpvar_14;
  lowp float tmpvar_15;
  tmpvar_15 = float((0.0 >= (check1_3 + check2_2)));
  lowp vec4 tmpvar_16;
  tmpvar_16 = texture2D (_tex0, tmpvar_12);
  highp vec4 tmpvar_17;
  tmpvar_17.xyz = tmpvar_16.xyz;
  tmpvar_17.w = (1.0 - _time);
  t0_1 = tmpvar_17;
  lowp vec4 tmpvar_18;
  tmpvar_18 = texture2D (_tex1, tmpvar_12);
  mediump vec4 tmpvar_19;
  tmpvar_19.xyz = tmpvar_18.xyz;
  tmpvar_19.w = (1.0 - t0_1.w);
  mediump vec4 tmpvar_20;
  tmpvar_20.xyz = (((t0_1.xyz * t0_1.w) + (tmpvar_19.xyz * tmpvar_19.w)) * tmpvar_15);
  tmpvar_20.w = (t0_1.w + tmpvar_19.w);
  gl_FragData[0] = tmpvar_20;
}



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