here’s the GLSL code something like inside the loop.

< ![CDATA[

varying vec2 texcoord0;

varying vec2 texdim0;

uniform float width;

uniform float slide_up;

uniform float slide_down;

uniform int iter;

uniform sampler2DRect tex0;

void main()

{

vec2 tc0 = texcoord0;

vec2 td0 = texdim0;

vec4 t1 = texture2DRect(tex0, tc0);

vec4 t2 = texture2DRect(tex0, tc0);

for (int i=1; i

{

float su = tc0.x+(i*width);

float sd = tc0.x-(i*width);

t1 = mix(t1,texture2DRect(tex0, vec2(su-(td0.x*floor(su/td0.x)),tc0.y)),slide_up);

t2 = mix(t2,texture2DRect(tex0, vec2(sd-(td0.x*floor(sd/td0.x)),tc0.y)),slide_down);

gl_FragColor = mix(t1,t2,0.5);

}

}

]]>