use namespace flare; use namespace flare.transforms; use namespace flare.filters; param SIN_TIME stime; param COS_TIME ctime; input UV0 uv; interpolated float2 iUV = uv; technique main { // set texture sampler2D texture < request = "St_Jamess_Park2.jpg"> ; sampler2D texture2 < request = "kenton.jpg"> ; // calculate wave UV float t = (iUV.y-0.5) * (1+stime.x)/2; float sint = sin(t*50); float t2 = (iUV.x-0.5) * (1+stime.x)/2; float sint2 = sin(t2*50); float2 uvs = float2( iUV.x + 0.08*sint, iUV.y - 0.02*sint2 //iUV.y; ); // scale UV uvs.x *=0.8; uvs.y *=0.8; uvs.x+=0.1; uvs.y+=0.1; // mix images float4 ratio = (1 + ctime.y)/2; float4 color = sampler2D(texture, uvs); float4 color2 = sampler2D(texture2, uvs); float4 color3 = color*(1-ratio) + color2 * ratio; // output output vertex = transform(); output fragment = color3; }