#version 330 core

in vec2 texCoord;
in vec4 vertexFragColor;
out vec4 fragColor;
uniform sampler2D texture0;
uniform vec4 color = vec4(1);
uniform float time = 1.0;

void main()
{
    vec2 coord=texCoord;
    coord.s += sin(coord.t*4 + time*1)*0.01;
    coord.t += cos(coord.s*3 + time*1)*0.01;
    vec4 color1 = color;
    if (coord.s < 0) {
        color1.a = 0;
    } else if (coord.s >= 1) {
        color1.a = 0;
    }

    fragColor = texture2D(texture0, coord) * color1;
}
