motionlab/effects/wave-shift.metal
0xrsydn a20d3310db Go native-only: remove the Python POC, move the Swift app to the top level
Adds --check (compile every effect without camera or window), EFFECTS.md
(the contract for writing effects) and AGENTS.md. The POC stays available
at the 'poc' tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 20:33:18 +07:00

13 lines
556 B
Metal

// RGB split that ripples down the image and gets pushed around by your movement.
// order 60
// slider amount 0.0 0.05 0.012
// slider waves 1.0 80.0 24.0
// slider speed 0.0 10.0 3.0
// slider react 0.0 3.0 1.0
float4 effect(float2 uv, Inputs in) {
float2 d = float2(in.p.amount * sin(uv.y * in.p.waves + in.time * in.p.speed), 0.0);
d += in.flow.sample(in.smp, uv).xy * in.p.react;
return float4(in.image.sample(in.smp, uv + d).r,
in.image.sample(in.smp, uv).g,
in.image.sample(in.smp, uv - d).b, 1.0);
}