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>
This commit is contained in:
parent
6591138bbf
commit
a20d3310db
29 changed files with 160 additions and 775 deletions
|
|
@ -1,22 +0,0 @@
|
|||
// Particles spawn where you move and drift along with the motion.
|
||||
// order 30
|
||||
// on
|
||||
// slider brightness 0.0 3.0 1.4
|
||||
// slider glow 0.0 4.0 1.5
|
||||
// slider hue 0.0 1.0 0.08
|
||||
// hue 0..1 -> a fully saturated colour (0 red, 0.08 orange, 0.33 green, 0.66 blue)
|
||||
static float3 hueColor(float h) {
|
||||
return clamp(abs(fract(h + float3(0.0, 2.0 / 3.0, 1.0 / 3.0)) * 6.0 - 3.0) - 1.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
float4 effect(float2 uv, Inputs in) {
|
||||
float core = in.particles.sample(in.smp, uv).r;
|
||||
float halo = 0.0;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
float a = 6.2832 * float(i) / 8.0;
|
||||
halo += in.particles.sample(in.smp, uv + float2(cos(a), sin(a)) * 5.0 / in.resolution).r;
|
||||
}
|
||||
float3 tint = hueColor(in.p.hue);
|
||||
float3 base = in.image.sample(in.smp, uv).rgb;
|
||||
return float4(base + tint * (core * in.p.brightness + halo / 8.0 * in.p.glow), 1.0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue