Remove the kaleidoscope effect

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
0xrsydn 2026-10-05 21:18:04 +07:00
commit 48b4d5afa1

View file

@ -1,13 +0,0 @@
// Folds the picture into mirrored wedges around the centre.
// order 90
// slider segments 2.0 16.0 6.0
// slider spin -2.0 2.0 0.2
float4 effect(float2 uv, Inputs in) {
float2 shape = float2(in.resolution.x / in.resolution.y, 1.0);
float2 c = (uv - 0.5) * shape;
float wedge = 6.2832 / floor(in.p.segments);
float a = atan2(c.y, c.x) + in.time * in.p.spin;
a = abs(a - wedge * floor(a / wedge) - wedge * 0.5) - 1.5708; // fold into one mirrored wedge, pointing up
float2 from = float2(cos(a), sin(a)) * length(c) / shape + 0.5;
return float4(in.image.sample(in.smp, from).rgb, 1.0);
}