summaryrefslogtreecommitdiff
path: root/docs/effects-renderer.md
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2026-08-02 19:59:32 +0200
committercashmere <cashmere@autistici.org>2026-08-08 10:40:12 +0200
commit237248321a1a40b9b98e7e0a6df156d0aa247ef0 (patch)
tree62f2f46474b08c3b7723e78a2f4dd9cf58d64494 /docs/effects-renderer.md
parent465071d8232e74b1690280a38a86d435269fc35d (diff)
downloadopencut-237248321a1a40b9b98e7e0a6df156d0aa247ef0.tar.gz
feat: pan & zoom motion presets
Ken Burns-style motion effects (zoom in/out, pan left/right/up/down) that drag onto clips like regular effects. Instead of shader passes they evaluate a per-frame transform offset in resolveVisualState, so they stack with keyframed transforms and work in preview and export. - intensity param (0-100%, keyframable) scales the whole effect - easing select maps progress through the graph editor's bezier presets - supportsStandalone: false hides them from effect-track creation - empty shader pass groups are filtered out so pass-less effects and zero-intensity blur no longer crash the compositor
Diffstat (limited to 'docs/effects-renderer.md')
-rw-r--r--docs/effects-renderer.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/effects-renderer.md b/docs/effects-renderer.md
index d68cec21..54ffc93c 100644
--- a/docs/effects-renderer.md
+++ b/docs/effects-renderer.md
@@ -15,6 +15,16 @@ An effect definition has:
All effects use the shared GPU renderer. TypeScript decides which shader identifiers to run and which uniforms to pass. Rust/wgpu owns device creation, textures, and pass execution.
+## Motion presets (pan & zoom)
+
+Effects can also modulate an element's transform instead of running shader passes. A definition with a `motion` config (see `apps/web/src/effects/definitions/motion.ts`) evaluates a per-frame `MotionOffset` (scale multiplier + translate as canvas fraction) from an eased progress over the clip duration. `applyMotionEffects` in `apps/web/src/effects/motion.ts` composes these onto the resolved transform in `resolveVisualState`, so they work in preview and export and stack with keyframed transforms.
+
+- Built-in presets: `zoom-in`, `zoom-out`, `pan-left/right/up/down`
+- `intensity` (0–100, keyframable) scales the whole effect proportionally
+- `easing` (select) maps linear progress through the graph editor's `BUILTIN_PRESETS` cubic-beziers — non-linear by default ("smooth")
+- Motion effects set `supportsStandalone: false` — they only make sense on a clip, so the assets panel hides the add-to-timeline button and dropping on empty timeline space is a no-op
+- `renderer.passes` is `[]` for motion-only effects; they contribute no shader work
+
## Single-pass vs multi-pass
The renderer supports a `passes` array. Single-pass effects (e.g. color grading) just have one entry. Multi-pass is needed when an effect has to process its own output — blur (H then V), bloom (extract → blur → composite), glow, etc.