Commit Graph

76 Commits

Author SHA1 Message Date
Brandon Thomas fe89ab9146 Never crash: render and gpu crates without panic!()
render: the debug-only quantisation check uses debug_assert! instead of panic!. gpu: the
test-only panic on a wgpu validation error is cfg(test) with a narrow allow, and release
builds only log. Test-only unreachable!() calls become panic!(). Denies the panic lints in both
crates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:20:37 -04:00
Brandon Thomas f9e1807962 Merge branch 'main' into worktree-agent-abff9a10f06a98f2c
# Conflicts:
#	crates/gpu/src/tests_deferred.rs
2026-10-04 03:16:01 -04:00
Brandon Thomas c59e0a6407 Merge main into M13.28 worktree
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 02:57:55 -04:00
Brandon Thomas 91f4a603a9 Merge branch 'main' into worktree-agent-abff9a10f06a98f2c
# Conflicts:
#	docs/parity.md
2026-10-04 02:57:35 -04:00
Brandon Thomas f3715aac32 M13.30: web depth and polish
- GPU in browser job workers: each job worker opens its own WebGPU device
  (deferred readbacks); the Render Queue export and the analyses' frame loops
  are futures (render::passes, offload::run_request_async) whose frames
  render in passes, awaiting the device between them. GPU particles and
  Advanced 3D read back under keys too. workers.jobs reports passes and
  readbacks; the smoke test measures them.
- Layer buffers in the browser's OPFS disk cache: frame workers back their
  layer caches with a PrefetchStore; the page plans what to fetch before a
  request from recent misses (LayerPrefetch over the shared DiskIndex).
- Templates embed footage (default on, size-capped with a warning) and
  creating from a template extracts it next to the new project / into
  browser storage.
- ICC LUT profiles (lut8/lut16/lutAtoB/lutBtoA, from the public ICC spec) in
  Simulate Output > My Custom RGB, baked into a 3D LUT for the viewer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 02:57:17 -04:00
Brandon Thomas c4315818da M13.28: GPU generators (fx_gen2): Lightning, Advanced Lightning, Beam, Lens Flare, Radio Waves, Vegas, Stroke, Scribble, Write-on, Paint Bucket, Eyedropper Fill, CC Glue Gun, CC Threads, Audio Spectrum/Waveform, Basic Text, Path Text
The geometry stays on the CPU as per-frame plans shared with the CPU effects (bolts, mask
strokes, scribbles, contour segments, audio marks, glyph strokes, waves, flood-fill region,
eyedropper sample); segments and convex polygons are tile-binned and rasterised on the GPU
with the CPU's coverage functions. CPU output unchanged (gen_golden). CC Threads' exact ties
at round parameter values are a documented exception; Fractal stays on the CPU (needs f64).
Regenerated docs/effects.md, docs/parity.md EFF-5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 02:56:00 -04:00
Brandon Thomas 1c855c3e07 M13.29: GPU effects part D (particles and remaining fallbacks)
GPU render passes for CC Particle World / Systems II, Particle Playground,
CC Ball Action, CC Pixel Polly, CC Scatterize and Curl Noise (fx_particles,
chunked multi-pass raster); Shatter wireframe views, Foam extras, Timewarp
with a Matte Layer, strong Warp Fisheye/Twist (CPU f64 inverse map) and
custom .ocio configs no longer fall back to the CPU. CPU refactors pinned by
particle_golden / timewarp_golden / sim_golden hashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:35:56 -04:00
Brandon Thomas 5df9cde182 M13.28: GPU pixel ports (fx_pixel2): CC Cross/Radial/Vector Blur, Reduce Interlace Flicker, CC Composite, Color Link, Cineon, HDR Compander/Highlight Compression, Grow Bounds, CC Overbrights, CC Block Load, CC Burn Film, CC Glass/Plastic, CC HexTile, CC Mr. Smoothie, Inner/Outer Key, CC Simple Wire Removal, Basic 3D
Inner/Outer Key's trimap and Cleanup strokes, Color Link's sample and CC Glass/Plastic's
light are shared with the CPU effects (CPU output unchanged: gen_golden). CC Plastic now
reads its Bump Layer (it read the nonexistent bumpMap id).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:33:54 -04:00
Brandon Thomas 808ca70d47 Merge origin/main (M13.22 GPU effects part A) into M13.23: both GPU effect lists (236), docs recounted 2026-10-04 00:17:37 -04:00
Brandon Thomas 7c675124ae Merge origin/main (M13.24) into M13.23 2026-10-03 23:59:41 -04:00
Brandon Thomas 4a2ca9115b M13.23: Shatter wireframe views and Foam's texture / map extras fall back via gpu_supported (no readback attempt)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 23:59:22 -04:00
Brandon Thomas ca9a30bf0c Merge branch 'main' into worktree-agent-a38a174c36aa9f23a 2026-10-03 19:52:55 -04:00
Brandon Thomas 49d0c16c9f M13.23: docs — GPU effects part B (parity EFF-5, architecture GPU section, ROADMAP count, gpu crate docs)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:36:26 -04:00
Brandon Thomas 1ec9336d7c M13.23: GPU simulation render passes
CC Rainfall, Snowfall, Star Burst, Bubbles, Drizzle, Hair, Mr. Mercury,
Caustics, Wave World, Foam, Shatter, Card Dance and Card Wipe render on the GPU
(fx_sim.rs / fx_sim.wgsl). The per-frame simulation / layout stays on the CPU
and is shared with the CPU effect through plans (effects::sprite_plan,
piece_plan, bubble_list, mercury_blobs, drizzle_drops, wave_world_plan,
caustics_setup); a tiled item rasteriser composites sprites, bubbles, blob
fields and textured pieces in the CPU's order and shading. Layer-dependent
sprite colours (refracting rain, star-burst and hair roots) are sampled per
pixel; piece plans read the frame back once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:35:22 -04:00
Brandon Thomas 1b726349ab M13.24: web app depth (WEB-1) — GPU effects in frame workers, OPFS disk cache, storage manager
- GPU in the browser: each frame worker opens its own WebGPU device (Gpu::request_deferred) and
  renders the GPU compositor and GPU effects with deferred readbacks (effectcraft-gpu deferred):
  readbacks keyed by content start with map_async and miss, the pass returns placeholders, the
  layer cache's gate drops inserts, and FrameServer::resume renders again once the device
  delivered. Backend Auto times whole frames per comp in the workers. Frames with effects go to
  GPU workers instead of the page. CPU fallback without WebGPU in workers (?nogpuworkers).
- Fix: a WGSL constant (3.40282347e38) that Chrome rejects invalidated every GPU kernel in Chrome
  (the page's compositor too); a test checks every float literal fits f32.
- Disk cache in the Origin Private File System: workers write sealed frame entries with sync
  access handles (temp file + move), the page keeps the DiskIndex (LRU under the settings' limit,
  at most half the quota) and reads hits instead of rendering; survives reloads; blue cache bar.
- Storage manager: Settings ▸ Disk ▸ Browser Storage (usage/quota, persistent storage, Clear
  buttons, automation ids) and storage.info / storage.persist / storage.clear (StorageHost).
- Docs: web.md (GPU workers, deferred passes, disk cache, storage manager, threading design:
  one engine instance per worker), architecture, preferences, parity (WEB-1), roadmap.
- Tests: deferred passes vs CPU on a real device, placeholder gating, frame server passes and
  Auto, GPU worker routing + disk cache across a reload, storage commands and widgets, store
  usage by kind; smoke test: GPU effect frames in workers with pixel parity, disk hits after a
  reload, storage manager.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:35:03 -04:00
Brandon Thomas 0c4e533460 M13.22: GPU compositing of Advanced 3D runs with blend modes, track mattes (2D and 3D), Preserve Transparency, and environment backgrounds (Classic and Advanced 3D skies)
render: three_d::adv::SplitRun (Renderer::split_adv_run) hands draw_run's split path to an
accelerator as data (main scene, special layers far to near, 3D mattes drawn solo);
Renderer::sky_draw / three_d::SkyDraw for Environment Light Background layers. gpu: the walk
draws skies (adv_sky kernel), resolves each special layer, hides it behind the nearer main
scene (occlude kernel) and composites it through the 2D path without readbacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:26:06 -04:00
Brandon Thomas a909de43b7 M13.22: GPU time effects (Time Difference, Time Displacement, CC Force Motion Blur, CC Wide Time, Pixel Motion Blur, Timewarp's frame building; motion vectors and frame fetches on the CPU)
Timewarp without a Matte Layer is now planned once (time_fx::timewarp_plan: frames, shutter
instants, motion fields) and built by the CPU or the GPU from the plan; with a Matte Layer it
renders on the CPU (catalog::gpu_supported).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 17:57:03 -04:00
Brandon Thomas 2e5ea051a8 M13.23: GPU Immersive Video effects
VR Blur, Chromatic Aberrations, Color Gradients, Converter (all projections and
cube layouts), De-Noise, Digital Glitch, Fractal Noise, Glow, Plane to Sphere,
Rotate Sphere, Sharpen and Sphere to Plane run on the GPU (fx_vr.rs /
fx_vr.wgsl) with the CPU's equirectangular maths: seam-wrapping, pole-continuing
sampling and latitude-widened box blurs, per eye for stereo layouts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 17:53:23 -04:00
Brandon Thomas d0b92948ee M13.22: GPU transitions and perspective (Block Dissolve, CC Glass/Grid/Image Wipe, CC Jaws, CC Line Sweep, CC Radial ScaleWipe, CC Scale Wipe, CC Twister, CC WarpoMatic, Radial Shadow, CC Bender, CC Blobbylize, CC Cylinder, CC Sphere, CC Spotlight, CC Environment, 3D Glasses) and text (Numbers, Timecode: CPU glyph coverage, GPU composite)
CC Environment now fades nearly transparent environment texels to black continuously
(colour / max(alpha, 1e-3)) instead of a hard 1e-6 un-premultiply cut-off, which turned the
filtered map's float noise into colour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 17:48:02 -04:00
Brandon Thomas e3e35a7ec2 M13.23: GPU colour management (LUTs, OCIO, Color Profile Converter, Lumetri LUT/look)
Apply Color LUT, OCIO CDL / Color Space / Display / File / Look Transform and
Color Profile Converter compile to colour programs (effects::color_program,
built next to the CPU effects) that fx_lut.wgsl interprets per pixel; LUTs
(1D, 3D, cineSpace shapers, inverses) are read from the storage buffer with the
CPU's nearest / trilinear / tetrahedral interpolation. Lumetri's Input LUT and
Look no longer force the CPU. Custom .ocio configs stay on the CPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 17:43:24 -04:00
Brandon Thomas 6b91afc087 M13.23: GPU 3D Channel effects (aux channels as textures)
3D Channel Extract, Cryptomatte, Depth Matte, Depth of Field, EXtractoR, Fog 3D,
ID Matte and IDentifier run on the GPU (fx_depth.rs / fx_depth.wgsl): aux planes
upload as a texture and are resampled onto the buffer grid with the CPU's index
arithmetic; tests compare against the CPU at 1x / 2x aux resolution, padded
buffers, half resolution and 8 / 32 bpc composites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 17:33:41 -04:00
Brandon Thomas f7927c8f9f M13.22: GPU CC light family (CC Light Rays, CC Light Burst 2.5, CC Light Sweep, CC Light Wipe)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 17:31:26 -04:00
Brandon Thomas a4f4d72f27 Merge branch 'main' into worktree-agent-a4b0610bd14276508 2026-10-03 10:53:00 -04:00
Brandon Thomas 750868244a M13.13: GPU Circle, Ellipse, Iris Wipe, Bevel Alpha, Bevel Edges, Gaussian Blur (Legacy)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:53:00 -04:00
Brandon Thomas ea292a6e81 M13.13: fuse 8/16 bpc quantise into the layer composite; steady-state bench traffic
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:44:52 -04:00
Brandon Thomas 9ff0e5aa3c M13.13: gpu texture pool, Auto per-comp backend choice, warp-family GPU ports
- gpu: pooled working textures (released once every encoder that could read
  them is submitted), shared zero images, reused readback staging buffers,
  direct readback into Image; NaN-poisoned scratch images under test and
  NaN-aware diffs; validation errors panic under test
- render: AutoPick (per comp / scale / path EWMA of CPU vs GPU frame times,
  warm-up and periodic re-probe) behind Backend::Auto; viewer uses it too;
  cached adjustment footprints (uploaded once)
- gpu fx_warp: Warp, Bezier Warp, CC Bend It, CC Page Turn, Smear, Reshape,
  Color Emboss, Cartoon; sliding-histogram median for large radii; CC Power
  Pin perspective < 100
- cli: bench --gpu reports Auto and per-frame upload / readback MB

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 10:31:31 -04:00
Brandon Thomas dc132bc219 Merge main into M13.11 (bokeh kernel_spans/blur_levels, Essential Graphics as_type controls with mirrors and links)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 09:54:37 -04:00
Brandon Thomas bb24b931a6 M13.11: advanced 3d gpu
Advanced 3D runs render entirely on the GPU: every motion-blur sub-sample
rasterised, resolved and averaged, the depth-based iris depth of field
(Classic 3D bokeh spans, highlight boost, progressive levels), the sRGB
encode and the composite over the GPU canvas (Accelerator::render_3d,
Renderer::prepare_adv_run, adv3d.wgsl). Wireframe outlines draw on the GPU.
Fixes NaN environment lookups for straight up/down normals on Metal.
bench --gpu gains an Advanced 3D comp (--adv3d).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 09:38:11 -04:00
Brandon Thomas f309381cd3 M13.9: gpu crate docs, tidy GPU_EFFECTS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:57:33 -04:00
Brandon Thomas 4ce3651723 Merge main into M13.9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:43:44 -04:00
Brandon Thomas 05b229825e M13.9: gpu Refine Soft / Hard Matte (single-frame refinement)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:41:11 -04:00
Brandon Thomas 0fbde2f4ec Merge M13.9 gpu stylize and distort (fx_stylize)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:32:18 -04:00
Brandon Thomas 6e556690ad M13.9: gpu Color Stabilizer apply pass
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:28:27 -04:00
Brandon Thomas 7f6e9c5e41 M13.9: gpu Twirl (Legacy), CC Ripple Pulse, CC Power Pin (full perspective), CC Flo Motion
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:25:22 -04:00
Brandon Thomas 6cbb6bfb93 Merge M13.9 gpu noise, blurs and time (fx_noise)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:21:23 -04:00
Brandon Thomas 3bf7c4bcd2 M13.9: gpu Shadow/Highlight, CC Color Neutralizer, Invert HLS / YIQ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:17:52 -04:00
Brandon Thomas 2e5d35dcee M13.9: gpu stylize and distort (posterize, threshold, CC Threshold / RGB, strobe, CC Vignette, scatter, brush strokes, roughen edges, texturize, motion tile, CC Kaleida, CC RepeTile, mirror, offset, polar, spherize, corner pin, optics compensation, magnify, CC Slant / Smear / Split / Split 2 / Tiler / Griddler, liquify; glow operations and arbitrary map; transform motion blur)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:16:58 -04:00
Brandon Thomas 4afe56cbca M13.9: gpu noise, blurs and time (median, dust & scratches, remove grain, turbulent / fractal noise modes, noise alpha / HLS, smart / bilateral / channel / compound blur, sharpen, unsharp mask, minimax, echo, posterize time)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:15:11 -04:00
Brandon Thomas 7a96fab302 M13.9: gpu colour corrections (fx_tone)
Levels (Individual Controls), Gamma/Pedestal/Gain, Photo Filter, Change Color,
Change to Color, Leave Color, Broadcast Colors, Color Balance (HLS), Video
Limiter, PS Arbitrary Map, CC Toner, CC Color Offset, CC Kernel, Auto Levels /
Contrast / Color and Equalize (histograms measured on the CPU, applied on the
GPU) on the GPU; Hue/Saturation colour ranges and Levels' channel controls no
longer fall back to the CPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:13:58 -04:00
Brandon Thomas 8ba936f87b M13.9: gpu keying, matte and channel effects (fx_key)
Color Key, Luma Key, Color Range, Extract, Difference Matte, Color Difference
Key, Screen Key, Spill Suppressor, Advanced Spill Suppressor, Key Cleaner,
Unmult, Simple Choker, Matte Choker, Set Matte, Set Channels, Shift Channels,
Remove Color Matting, Arithmetic, Solid Composite, Channel Combiner, Blend,
Calculations, Compound Arithmetic on the GPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:02:03 -04:00
Brandon Thomas 404b855986 Merge main into M13.6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 07:53:31 -04:00
Brandon Thomas 47f61debcb M13.9: gpu effect family scaffolding (fx_key, fx_stylize, fx_noise)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 07:51:33 -04:00
Brandon Thomas a2693c9d15 M13.6: Classic 3D bokeh depth of field on the GPU (WGSL); 3D-matte GPU check
Planes prepared for the GPU carry their depth of field (padding, radius map, levels) and the
bokeh_boost / bokeh_prefix / bokeh_gather kernels blur them where they are drawn, with the CPU's
spans; GPU-vs-CPU agreement tests for iris shapes, highlights, fringe, Fast Rectangle, tilted
planes and a 2D layer with a 3D track matte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 07:44:43 -04:00
Brandon Thomas 225f31bf50 Merge main into M9.13 (GPU kernels defer CPU-only controls via catalog::gpu_supported)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 07:29:30 -04:00
Brandon Thomas 3a7c9c5f61 M9.13: Transform shutter-angle motion blur, Glow Operation / Arbitrary Map, Cartoon Edge Enhancement
- Transform: Use Composition's Shutter Angle / Shutter Angle, sampling the transform across
  the shutter via EffectHost::params_at (EffectEnv::shutter carries the comp shutter when
  motion blur is on); the GPU path defers to the CPU when blurring.
- Glow: Glow Operation (blend modes) and Glow Colors > Arbitrary Map.
- Cartoon: Advanced > Edge Enhancement (shock-filter sharpening / softening).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 04:23:15 -04:00
Brandon Thomas 3103e7e80f M9.13: Fill masks/feather, Refine mattes Reduce Chatter and motion blur
- Fill: Fill Mask, All Masks, Horizontal / Vertical Feather, Invert outside the mask
  (GPU falls back to the CPU when masks are used).
- Refine Soft / Hard Matte: Reduce Chatter (temporal steadying of oscillating edges) and
  Use Motion Blur (samples, shutter angle, higher quality) from neighbouring frames.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 03:30:33 -04:00
Brandon Thomas e7fdd6fdbd Merge main into M12.7 (environment background layers keep their 3D runs on the CPU path)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 03:03:21 -04:00
Brandon Thomas f85468c694 M12.7: docs (architecture, parity, gpu crate docs)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 03:00:29 -04:00
Brandon Thomas ea3e983876 Merge GPU colour effects into M12.7 (docs/effects.md regenerated: GPU badges)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 02:54:53 -04:00
Brandon Thomas 79d3d65478 Merge GPU blur/transition/generate effects into M12.7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 02:47:46 -04:00