Commit Graph
260 Commits
Author SHA1 Message Date
midasdf cbd67baf36 Text: the zh-hans Han order test replaces the skipping render test (#2039)
The CJK render test skipped wherever no Japanese face was installed, which
is every CI runner, and on a Mac it drew glyphs with or without the fix, so
it caught nothing. Replace it with a fallback-order test: fixture faces for
`Hiragino Sans` and `Hiragino Sans GB` show that a zh-hans Han lookup tries
the Chinese family first, that ja tries the Japanese one, and that a layout
gets Hiragino Sans GB. Synthetic fonts in an isolated child process keep it
independent of the host's fonts; with the Simplified list reverted it fails
on `[7]` against `[8, 7]`.

Delete `TEST_CJK_LOCALE`: the locale-mutating tests moved to an isolated
child process, so nothing used the lock and the test-only static failed
clippy's `-D warnings` gate.

Trim the documentation edits to the single docs/gaps.md gap-11 row: revert
the header and changelog edits in ROADMAP.md, docs/roadmap.md,
docs/localization-parity.md and docs/target-app-parity.md, and the gaps.md
header and changelog row, which conflict with other PRs.

Tests: cargo clippy -p effectcraft-text -p effectcraft-render --all-targets
-- -D warnings, cargo clippy --workspace --all-targets -- -D warnings,
cargo test -p effectcraft-text (79 lib), cargo test -p effectcraft-render
(264 passed, 1 ignored perf test), cargo fmt --all -- --check.
2026-10-29 14:47:22 +09:00
midasdf 667ebf229a Merge remote-tracking branch 'origin/main' into jp/cjk-composition-rendering 2026-10-29 14:41:28 +09:00
BFlat 226b954777 Merge pull request #2553 from arnav-hiwarkar/perf/2551-disk-cache-bounded
Disk cache: 20 GB default and a free-space reserve, so it no longer fills the disk (#2551)
2026-10-29 10:09:24 +07:00
BFlat a19afa0b9b Merge pull request #2450 from dotCooCoo/feat/wiggle-paths-spatial-phase
Shapes: Wiggle Paths has Spatial Phase, which slides its wiggle along the path
2026-10-29 10:08:43 +07:00
arnav-hiwarkarandClaude Opus 5.5 8ab492d8cd Disk cache: apply the free-space reading where it's taken, evict off the UI thread at open (#2551)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 22:45:48 +05:30
arnav-hiwarkarandClaude Opus 5.5 52dda004a5 Disk cache: evict before writing, reset the disk reading when the folder changes (#2551)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 21:55:33 +05:30
arnav-hiwarkarandClaude Opus 5.5 8af5f54c92 Disk cache: give space back below the free-space reserve, skip writes that can't fit (#2551)
A disk reported as 0 bytes (an automount map) counts as unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 18:34:02 +05:30
arnav-hiwarkarandClaude Opus 5.5 6efeae3793 Disk cache: 20 GB default, a free-space reserve and cheaper eviction (#2551)
- Default disk cache size 20 GB (was 100 GB); settings version 3 migrates the stored old
  default and keeps a size the user chose.
- The cache keeps max(2 GB, 5% of the disk) free: sysinfo::disk_space (df -Pk / PowerShell
  DriveInfo) is read in the background from memory_tick and caps the limit
  (DiskCache::set_disk_space); cache.diskStats reports limitBytes.
- Eviction goes down to 90% of the limit, so the LRU sort runs once per tenth of the limit
  written instead of on every write at the limit.
- Failed writes are counted (cache.diskStats failed) and the first is logged.

Also fixes #2063.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 18:27:31 +05:30
dotCooCoo 32f058ea05 Merge main into feat/wiggle-paths-spatial-phase 2026-10-28 05:39:33 -07:00
Matej Kozlovský 6e69b91a80 Export: H.264 frames convert to YUV 4:2:0 on the GPU
Accelerator::comp_frame_yuv420 (default None) renders a top-level comp frame and
converts it over the background to the H.264 export's 8-bit BT.709 limited-range
4:2:0, every byte within one level of the CPU conversion (the GPU kernel follows
it operation for operation, including NaN and half-away-from-zero ties, but a
driver may contract its arithmetic). A 4K frame then reads back 12 MB of planes
instead of 133 MB of RGBA f32.

The H.264 export asks the accelerator for planes when a frame needs nothing after
the render (progressive, project depth, no crop/resize, rendered at the output
size) and otherwise renders and converts on the CPU as before. Deferred
readbacks (a browser worker) keep the pass-based path. Sizes the kernel can't
take (width not a multiple of 8, odd height) are declined before any GPU work.

Like Cx::frames, h264_frames caps GPU frames in flight only while the
accelerator is up (map_frames_while with the same liveness check): once the GPU
stops for good, the remaining frames render on the CPU side by side instead of
one at a time.

rgba_to_yuv420 moves to effectcraft_raster::yuv so the export and the GPU tests
share one reference. The GPU tests skip without an adapter (tests::gpu()), as
the crate's others do.
2026-10-28 13:19:24 +01:00
Dylan M. Taylor 5d71dce7fc Refactor render for strict Clippy checks 2026-10-28 06:09:21 +00:00
NetterSilverandClaude Opus 5.5 db41fa7980 Skip transparent pixels and quantise while compositing
Much of a layer buffer is often transparent (a stroked ring, a glow-padded
text layer, a precomp canvas), yet every destination pixel sampled it
bilinearly, and 8/16 bpc comps then re-quantised the layer's whole rotated
bounding box.

- Bilinear warps skip 16x16 source tiles whose pixels (and a one-pixel
  apron) all have zero alpha: their samples are transparent and were never
  drawn.
- The fast affine warp reports the rectangle it changed and, given the
  comp's levels, quantises each pixel as it blends it, so draw_comp has
  nothing left to re-quantise for that layer. quantize_px moves to
  effectcraft-raster for this.
- quantize_rect skips runs of four all-zero (+0.0) pixels, which quantise
  to themselves.
- to_rgba8 / to_rgba8_over convert row by row instead of per 4-byte item.

Every pixel stays bit-identical: tests compare the warp against the
reference path, fused quantising against quantising after blending, and
the zero-run skip against per-pixel quantising.

With the previous commit, demo comp to H.264 (`cargo xtask bench --scenario
demo --format h264 --frames 300`, 11 interleaved runs on a 16-thread Ryzen):
wall 9.26 s -> 6.97 s median (-24.8%), 8.55 s -> 6.55 s min (-23.3%); CPU
time -23%. Output byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:40:41 +01:00
midasdf 5aadb0df80 Merge remote-tracking branch 'origin/main' into pr
# Conflicts:
#	crates/text/src/fonts.rs
#	crates/text/src/layout.rs
2026-10-27 22:33:32 +09:00
aiongg b7b75ed37a style: cargo fmt on the moved files 2026-10-26 21:54:30 +00:00
aiongg cbce15f069 refactor(render): move footage, effect host, accelerators, options, pipeline, layers and frames out of lib.rs 2026-10-26 21:49:11 +00:00
aiongg 9526833a62 refactor(render): move loose test files to src/tests/ 2026-10-26 21:49:11 +00:00
aiongg 226f76a5bf refactor(render): move src/three_d/mod.rs to src/three_d.rs 2026-10-26 21:49:10 +00:00
aiongg 0497fa6250 refactor(render): move src/three_d/adv/mod.rs to src/three_d/adv.rs 2026-10-26 21:49:10 +00:00
skylar taylor-barrick 69b9ce2bd1 M0.37: reconcile shared docking and qualify migration follow-up 2026-10-26 06:47:07 +01:00
dotCooCoo 8ebacda419 Shapes: Wiggle Paths has Spatial Phase, which slides its wiggle along the path
Wiggle Paths had Size, Detail, Points, Wiggles/Second, Correlation,
Temporal Phase and Random Seed, but no Spatial Phase, which After
Effects lists among its properties (ADBE Vector Spatial Phase). Spatial
Phase now moves each point's own displacement along its subpath: 360
degrees is once around, and a fraction of a point is interpolated
between neighbors. At 0 degrees a path draws as before.

A project saved without the property gets it at 0 degrees, after
Temporal Phase, when it opens. Scripts can read and set every Wiggle
Paths property by its match name.
2026-10-25 16:06:28 -07:00
skylar c16a628849 chore(deps): refresh safe dependency bumps
serde_json 1.0.154, proptest 1.12.0, objc2 0.6.5, winresource 0.1.34, pollster 1.0.1, miniz_oxide 0.9.1, linesweeper 0.5.0, lz4_flex 0.14.0, muda 0.21.2.
2026-10-25 16:36:21 -06:00
Dylan M. Taylor e821feeec4 Merge pull request #2274 from storytold/sonar/rust-s4325-s1612
sonar: method paths instead of closures (rust:S1612)
2026-10-25 16:36:06 -04:00
aiongg 991904888a Merge pull request #1643 from arnav-hiwarkar/fix/1641-keep-cache-outside-edit
Preview: an edit keeps the cached frames outside the layers it changes (#1641)
2026-10-24 16:27:16 -04:00
Dylan M. TaylorandClaude Sonnet 5.5 4e9fa51f12 sonar: method paths instead of closures (rust:S1612)
Poison recovery, OsStr::to_str and char predicates only; S4325 casts are
f64 to f32 and stay.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 08:17:16 +00:00
midasdf bf069fe4f9 Merge remote-tracking branch 'origin/main' into jp/cjk-composition-rendering
# Conflicts:
#	crates/text/src/fonts.rs
#	docs/localization-parity.md
2026-10-24 09:59:55 +09:00
aiongg ce3791eba5 Merge #1915: test(render): make automatic backend checks independent of timing (@TimotheusG) 2026-10-24 00:13:55 +00:00
aiongg 22cdd26365 Merge #2223: Composition Settings: Resolution menu with the frame size and memory at that resolution (@marcoarnulfo) 2026-10-23 23:33:23 +00:00
aiongg bae27ebbe7 Merge #1841: Cryptomatte: pick the ID under a point into the Selection (effect.pickCryptomatte) (@MatejKozlovsky) 2026-10-23 23:33:10 +00:00
aiongg d74fe2d51e Merge #2003: Motion Tile's Output size works on adjustment layers (#1727) (@ded-achtung) 2026-10-23 23:22:30 +00:00
aiongg 14900b747d Merge #2211: #2094 (adv): crisp cast shadows so diffusion only softens (@ChristopherLinnett) 2026-10-23 23:22:30 +00:00
aiongg a78c7a585d Merge #1872: Color effects and keys render as in After Effects (Tint, Tritone, Black & White, Exposure, Levels, Brightness & Contrast, Curves, Luma Key, Extract, 4-Color Gradient, Fill) (@vangel76) 2026-10-23 23:21:37 +00:00
aiongg 295d104e19 Merge #1699: Preview: replaced browser media gets a new disk-cache key (#1253) (@vbasky) 2026-10-23 21:36:58 +00:00
aiongg feb6c12b91 Merge #1928: #1812: workers that render a layer at once share the cached buffer (@ded-achtung) 2026-10-23 21:34:56 +00:00
aiongg 74f7e76f41 Merge #1917: #1812: stills at reduced resolution are resampled once, and their layers cached (@ded-achtung) 2026-10-23 21:34:54 +00:00
aiongg d57fed9fcc Merge #1837: Text: draw Faux Bold and synthetic bold (#1676) (@HEOJUNFO) 2026-10-23 21:26:20 +00:00
Marco Arnulfo 24e61ce273 Composition Settings: the Resolution line shows the frame size the renderer produces (#2167) 2026-10-23 16:34:22 +02:00
Christopher Linnett 32ae41c4eb #2094 (adv): crisp cast shadows so diffusion only softens
Shadow maps use the full scene-derived size (point-light faces capped
at 2048) under a 26M-texel scene budget halved largest-first; the PCF
filter measures its reach in output pixels with a two-texel minimum,
samples texel centres on a jittered adaptive 5..10 grid, and compares
each texel against the receiver plane's own depth so wide kernels never
self-shadow lit casters. The WGSL mirror is parenthesised (Tint rejects
the old form) and guarded by a shader-wide grammar test; the CPU
reference and shader remain step-for-step parity-tested.
2026-10-23 16:21:21 +08:00
midasdf 434258050a Text: Chinese Han text uses the installed Chinese face (#453)
macOS does not install the on-demand PingFang SC (macOS 27 on an English
install ships Hiragino Sans GB, Heiti SC, Songti SC and STSong instead),
and the Simplified Chinese fallback list named only Windows and Linux
families. A Chinese character therefore fell through to the exhaustive
search, which picks the first installed face that covers it — Hiragino
Sans, the Japanese face — so Chinese text in a composition was drawn
with Japanese glyph forms (#453). Japanese kana and kanji were already
handled, and a Chinese-only character the Japanese face lacks (e.g.
页) still found a Chinese face, which is why the symptom looked
selective.

Add the macOS Chinese faces to the fallback lists: Hiragino Sans GB,
Heiti SC, Songti SC and STSong for Simplified Chinese, Songti TC for
Traditional (Heiti TC was already named). The interface language still
chooses between the scripts and an English interface keeps the
Japanese-first order for shared Han ideographs, as designed in #312;
what changes is that a Chinese-locale request has an installed Chinese
family to answer it on macOS.

Tests: a text-layer render test draws Japanese and Chinese text and
checks glyph coverage (skipped where no CJK face is installed); a layout
test checks every CJK glyph comes from a face that has the character, so
a missing-glyph box cannot creep back; and the fonts test fails without
the list change ("Hiragino Sans GB missing from the Han list"), passes
with it, and walks the Han branch's list to prove the first installed
Simplified family is a Chinese face, not a Japanese one.

Verified with CARGO_BUILD_JOBS=2 RUST_TEST_THREADS=2:
effectcraft-text 64 passed; effectcraft-render 233 passed, 1 ignored;
cargo clippy -p effectcraft-text -p effectcraft-render --all-targets --
-D warnings clean; cargo fmt --all -- --check clean. A 900x240 render of
"骨直真具画 中文测试" with the zh-hans request now uses Hiragino Sans GB
and differs from the Japanese render, which still uses Hiragino Sans.
2026-10-22 01:00:20 +09:00
dedandClaude Opus 5.5 915ba28a9d Motion Tile's Output size works on adjustment layers (#1727)
On an adjustment layer Motion Tile kept the comp-sized buffer whatever the
Output Width / Height, and the adjustment draw dropped any stack result whose
size differed from the canvas. After Effects grows (or crops) the comp
rectangle there as on any layer, so a Transform after it brings the extra
tiles into view, as in the frames attached to #1727 and #1409.

- motion_tile_frame: one output frame for the CPU and GPU effect; on an
  adjustment it grows about the comp rectangle on whole pixels, keeps the
  buffer at 100 % and past 16 384 pixels a side.
- adjustment_crop: the CPU and GPU adjustment draws put a stack result whose
  frame changed back onto the canvas instead of dropping it (Enc::crop on
  the GPU).

Tests: the #1727 After Effects frames (910 x 340 % and 90 x 340 % then
Scale 12 %), tiles past the frame and cropping on CPU, GPU vs CPU for
adjustment and full-frame layers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 10:35:47 +03:00
dedandClaude Opus 5.5 a330110476 G5: a styled layer rendered by two workers at once shares its body and passes (#1812)
Review: styled() kept the buffers it rendered instead of the ones LayerCache::insert returned, so
without a blending-space conversion concurrent misses still returned separate body and pass
buffers (and the GPU uploaded each).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 16:12:22 +03:00
dedandClaude Opus 5.5 9c5494fd29 G5: a layer rendered by two workers at once is shared from the cache (#1812)
Preview workers that start together miss the layer cache together, and each kept its own copy
of every layer; on the GPU each copy was uploaded and packed into its own Classic 3D atlas, which
ran the device out of memory on a cold start. LayerCache::insert now keeps the first buffer of a
key and returns it, and the renderer goes on with the returned buffer, so the workers share one.
Renders don't wait for each other: on the shared frame pool a blocking wait could end up beneath
the work it waits for (tried, it stalled playback for the wait's timeout).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 12:31:25 +03:00
dedandClaude Opus 5.5 e14cdd6009 Layer cache: animated masks with mask motion blur key the layer time
Review: mask motion blur draws an animated mask at the shutter's other times, but the layer key
hashed its value at this time only. Two frames with the same mask value (a hold before a move)
shared a cached layer, with the wrong blur. This applied to solids, text and shapes already, and
to stills since this PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 04:21:53 +03:00
dedandClaude Opus 5.5 fd1250d224 G5: still footage layers are kept in the layer cache across times (#1812)
Footage layers had no layer cache key, so a still made a new layer buffer every frame on every
preview worker, and the GPU compositor uploaded it again each time (its upload cache is keyed
by buffer). Stills (without a proxy) are now keyed like text and shape layers, without the
source time; movies and sequences are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 03:43:33 +03:00
TimotheusG c4505d34de test(render): document automatic backend fixtures 2026-10-19 18:47:51 -04:00
TimotheusG e551cbe2ca test(render): use controlled costs for Auto backend checks 2026-10-19 18:26:34 -04:00
vangel76andClaude Opus 5.5 515cc3d5f7 Levels: channel controls before RGB, "Off for 32 bpc Color" unclipped in 32 bpc, as After Effects
After Effects 2026 in a 32 bpc project, Levels (Individual Controls) with RGB
(0.1, 0.9, gamma 1.5, 0.05, 0.95), Red Gamma 0.8, Green Input White 0.8 and
Blue Output Black 0.2 on grey steps 0..255 (case 904 E07): every step matches
"each channel's controls, then the RGB controls" with nothing clipped
(values below Input Black end below Output Black, above Input White above
Output White). EffectCraft ran RGB first and clipped "Off for 32 bpc Color"
(it could not see the bit depth): up to 27/255 off on 95 % of the grid; now
0 grid points off, max 1/255, CPU and GPU.

EffectEnv gains float_depth (the renderer sets it for 32 bpc projects), so
"Off for 32 bpc Color" clips in 8 / 16 bpc projects as before. Unclipped
values below 0 take the gamma mirrored through 0. Plain Levels keeps its
order (its channel controls were not measured); its clipping follows the same
rule. EffectCraft's own projects default to 8 bpc and are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:14:42 +02:00
vangel76andClaude Opus 5.5 fb16d5573e Tint: Rec. 601 luminance weights, as After Effects
After Effects 2026 (sRGB working space, not linearised) maps red, green,
blue and 50% grey solids at Tint's defaults to 76, 150, 29 and 128/255:
Rec. 601 weights on the working-space values, not Rec. 709. CPU and GPU
kernel changed; tests pin the four greys within 1/255.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:12:50 +02:00
SBaksa c17f9eb959 Text Range Selector: Start, End and Offset show as counts with Units = Index (#1814)
With Units set to Index the selector already counts characters (words,
lines), but the timeline kept showing Start, End and Offset as
percentages ("3.0%"), so switching looked like it did nothing. They are
now shown without the % sign while Units is Index
(render::text::in_index_units).
2026-10-19 21:08:16 +11:00
Matej Kozlovský 76098665b0 Cryptomatte: effect.pickCryptomatte picks the ID under a point into the Selection (#473)
Engine part of viewer picking: replace / add / remove the top-coverage ID at a
layer-space point in one undo step, at the time the Selection was read. The
aux channels come from the render's own path (Renderer::layer_aux, shared with
the effect host; footage at its source time, 3D precomps) through a renderer
set up like Session::render (expressions, render prefs, layer cache). An
optional scale snaps the point to the pixel a preview at that resolution
samples. New effects::crypto_select quotes names and falls back to <hex> for
unnamed, wildcard-looking or ambiguous names. effect.cryptomatteAt is the
read-only hover query.
2026-10-19 06:10:27 +02:00
heojunfoandClaude Opus 5.5 4bc40c7ac3 Text: grow Faux Bold per axis under a non-uniform scale (#1676)
Synthetic bold grows a glyph's outline in its own space, so a
non-uniform character Scale stretches it more along one axis. The patch
and layer bounds reserved it through mean_scale and could clip the
stretched side; they now reserve how far the bold reaches along x and y.

A run of solid fills grows its glyphs together in layer space by one
radius, which only matches when the bold stays round there: a bold glyph
whose matrix stretches or skews is no longer gathered into a run.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-19 11:04:36 +09:00