#version 150

uniform sampler2D DiffuseSampler;
uniform float Time;
uniform float Strength;
uniform vec3 Tint;

in vec2 texCoord;
out vec4 fragColor;

void main() {
    float offsetX = sin(texCoord.y * 20.0 + Time * 2.0) * Strength;
    float offsetY = cos(texCoord.x * 20.0 + Time * 2.0) * Strength;
    vec2 distortedUV = texCoord + vec2(offsetX, offsetY);

    vec4 color = texture(DiffuseSampler, distortedUV);

    color.rgb *= Tint;

    fragColor = color;
}
