30 float speedR = 5.0, amplitudeR = 0.03, wavelengthR = 10.0;
31 float speedG = 6.5, amplitudeG = 0.025, wavelengthG = 12.0;
32 float speedB = 4.0, amplitudeB = 0.035, wavelengthB = 8.0;
34 float rR = sin(uv.x * wavelengthR +
time_f * speedR) * amplitudeR;
35 rR += sin(uv.y * wavelengthR * 0.8 +
time_f * speedR * 1.2) * amplitudeR;
36 vec2 uvR = uv + vec2(rR, rR);
38 float rG = sin(uv.x * wavelengthG * 1.5 +
time_f * speedG) * amplitudeG;
39 rG += sin(uv.y * wavelengthG * 0.3 +
time_f * speedG * 0.7) * amplitudeG;
40 vec2 uvG = uv + vec2(rG, -rG * 0.5);
42 float rB = sin(uv.x * wavelengthB * 0.5 +
time_f * speedB) * amplitudeB;
43 rB += sin(uv.y * wavelengthB * 1.7 +
time_f * speedB * 1.3) * amplitudeB;
44 vec2 uvB = uv + vec2(rB * 0.3, rB);
46 vec4 c = texture(samp, uv);
47 c.r = texture(samp, uvR).r;
48 c.g = texture(samp, uvG).g;
49 c.b = texture(samp, uvB).b;
79 const vec2 centers[8] = vec2[](
89 const float radii[8] =
float[](
90 0.18, 0.18, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12
96 for (
int i = 0; i < 8; ++i) {
97 vec4 c =
lens(tc, centers[i], radii[i], k);
101 if (w > 0.0) acc /= w;
104 color = vec4(acc, 1.0);