50 vec2 center = vec2(0.5, 0.5);
51 vec2 off = tc - center;
52 float maxR = length(vec2(0.5));
53 float r = length(off);
55 float ang = atan(off.y, off.x);
57 float distortion = 0.5;
58 float dr = nr + distortion * (nr * nr);
59 dr = clamp(dr, 0.0, 1.0) * maxR;
60 vec2 d = center + dr * vec2(cos(ang), sin(ang));
62 float dir = sign(
rand(floor(
time_f * 0.2)) - 0.5);
63 float phase =
rand(floor(
time_f * 0.1)) * 6.2831853;
64 float rotateSpeed = 1.0;
65 float warpSpeed = 0.1;
67 ang += dir * (phase +
time_f * rotateSpeed);
70 float ca = cos(ang), sa = sin(ang);
71 vec2
rot = vec2(ca * dp.x - sa * dp.y, sa * dp.x + ca * dp.y) + center;
73 float t =
time_f * warpSpeed;
76 color = texture(samp, w);