#version 120

uniform sampler2D texture;
uniform float time = 1.0;

void main()
{
    vec2 coord=gl_TexCoord[0].xy;
    coord.s += sin(coord.t*5 + time*7)*0.01;
    coord.t += cos(coord.s*10 + time*5)*0.01;
    vec4 color = gl_Color;
    if (coord.s < 0) {
        color.a = 0;
    } else if (coord.s >= 1) {
        color.a = 0;
    }

    gl_FragColor = texture2D(texture, coord) * color;
}
