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
12
effects/colorize.metal
Normal file
12
effects/colorize.metal
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// Recolours the picture by brightness with a smooth colour ramp.
|
||||
// order 10
|
||||
// slider amount 0.0 1.0 0.8
|
||||
// slider palette 0.0 1.0 0.0
|
||||
// slider contrast 0.5 3.0 1.2
|
||||
float4 effect(float2 uv, Inputs in) {
|
||||
float3 c = in.image.sample(in.smp, uv).rgb;
|
||||
float luma = pow(dot(c, float3(0.299, 0.587, 0.114)), in.p.contrast);
|
||||
float3 ramp = 0.5 + 0.5 * cos(6.2832 * (luma * 0.8 + in.p.palette + float3(0.55, 0.4, 0.2)));
|
||||
float3 mapped = ramp * (0.15 + 0.85 * luma);
|
||||
return float4(mix(c, mapped, in.p.amount), 1.0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue