43 vec2 u = f * f * (3.0 - 2.0 * f);
44 return mix(mix(
rand(i + vec2(0.0, 0.0)),
rand(i + vec2(1.0, 0.0)), u.x),
45 mix(
rand(i + vec2(0.0, 1.0)),
rand(i + vec2(1.0, 1.0)), u.x), u.y);
53 float glitchStrength = 0.01;
55 uv.x += (
rand(uv +
time_f) - 0.5) * glitchStrength;
56 uv.y += (
rand(uv +
time_f * 1.5) - 0.5) * glitchStrength;
57 vec4 texColor = texture(samp, uv);
58 vec4
colorShift = vec4(texColor.r, texColor.g * 0.5 + 0.5 * timeNoise, texColor.b * 0.5 + 0.5 * (1.0 - timeNoise), texColor.a);
60 vec4 glitchColor = vec4(vec3(sin(glitchNoise *
time_f)), 1.0) * glitchStrength ;
61 color = mix(
colorShift, glitchColor, glitchStrength * glitchNoise);
62 color = sin(color *
time_f);