160 Commits
Author SHA1 Message Date
Brandon Thomas 681d99c0e7 Merge pull request #1731 2026-10-18 09:35:35 -04:00
Brandon Thomas a01f681551 Merge pull request #1704 2026-10-18 09:35:35 -04:00
Brandon Thomas fc3d228616 Merge pull request #1688 2026-10-18 09:35:34 -04:00
Brandon Thomas f16ef4a6b5 Merge pull request #1265 2026-10-18 09:35:32 -04:00
MarekSpodBiedry 0e5b366574 Keep CC Simple Wire Removal between points A and B (#1724) 2026-10-17 14:33:06 +02:00
heojunfoandClaude Opus 5.5 ee5c9ac2dd Advanced 3D: Accepts Shadows Only draws just the shadow (#1691)
The Advanced 3D renderer folded Accepts Shadows (Off/On/Only) into a
bool, so a shadow catcher set to Only drew as an ordinary lit surface.
The material now carries shadows_only. Such a fragment draws black at
the strongest shadow a light casts on it, as Classic 3D does, and it
goes in the blended pass so what is behind it shows through. The CPU
shader and advanced3d.wgsl get the same branch.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 13:31:08 +09:00
Matej Kozlovský f8bd967861 gpu: honour wgpu env overrides in headless/CLI (with_env, WGPU_ADAPTER_NAME, WGPU_POWER_PREF)
GpuContext::request() now applies InstanceDescriptor::with_env() (WGPU_BACKEND,
WGPU_DX12_COMPILER, WGPU_VALIDATION, WGPU_DEBUG, ...), the same variables the
desktop app honours via egui-wgpu, and requests PowerPreference::from_env(),
defaulting to HighPerformance (an unknown WGPU_POWER_PREF logs a warning).

WGPU_ADAPTER_NAME (CLI/headless only; the desktop ignores it) picks the first
adapter whose name contains the trimmed value, case-insensitively. Empty or
blank counts as unset. Only the name is matched (backend via WGPU_BACKEND). A non-matching name is an
error that says so and lists each distinct adapter once as 'name (backend)', instead of wgpu::util::initialize_adapter_from_env's panic;
no adapters at all gets its own message.
2026-10-16 20:12:35 +02:00
Vikram Bhaskaran 31d74e268d Normalize cardinal Wave Warp directions to preserve CPU and GPU parity. 2026-10-17 03:12:36 +11:00
BFlat 908c946fc1 Merge pull request #1538 from guillehr2/black-white-artifacts-1463
Effects: Black & White no longer turns faint colour noise in shadows into blocks
2026-10-16 19:02:00 +07:00
BFlat c6f6f9b373 Merge pull request #1511 from MatejKozlovsky/fallback-parallel
Export: render in parallel once the GPU stops for good
2026-10-16 19:01:38 +07:00
BFlat 90e68eb6ab Merge pull request #1524 from MatejKozlovsky/require-gpu-tests
GPU tests: say why the GPU didn't start, and fail with EFFECTCRAFT_REQUIRE_GPU=1 instead of skipping
2026-10-16 19:00:52 +07:00
BFlat 1071e57dfd Merge pull request #1520 from MatejKozlovsky/frame0-failfast
GPU: stop drawing a frame once the device has failed
2026-10-16 18:11:16 +07:00
BFlat 0953011664 Merge pull request #1549 from MatejKozlovsky/upload-cache-dead-entries
gpu: upload cache drops textures of freed buffers on every insert
2026-10-16 18:10:41 +07:00
BFlat 74ed4dc423 Merge pull request #1383 from marcoarnulfo/fix/1381-generators-alpha
Effects: 4-Color Gradient keeps the layer's alpha with Blending Mode None (refs #1381)
2026-10-16 18:08:08 +07:00
bflatasticandClaude Opus 5.5 45eacf1b17 GPU: upload_buf keeps its own doc comment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 17:33:50 +07:00
Matej Kozlovský 77a8d6ae73 gpu: upload cache drops textures of freed buffers on every insert
Entries whose layer buffer was freed were pruned only once the cache went over its budget
(1.5 GiB), so an animated layer, which makes a new buffer every frame, left a dead 4K texture
per frame allocated until the cache filled up.
2026-10-15 10:19:42 +02:00
Guillem Hermida 749e810174 Effects: Black & White keeps faint colour noise in shadows faint (#1463)
Black & White offset each pixel's luminance by (hue weight - 0.5) times
its HSL saturation. HSL saturation is near 1 for any tinted near-black
pixel, so the code or two of colour noise in compressed footage's
shadows came out as bright and black blocks, and a 32-bpc overbright
such as (1.5, 0.5, 0.5) divided by zero and went black.

The gray is now the pixel's smallest channel plus its chroma (largest -
smallest channel) times the same hue-interpolated slider weight. Neutral
pixels keep their value, a pure hue becomes its slider's percentage
(Reds 40% turns pure red into 40% gray), noise moves the gray by no
more than its own size, and nothing divides. The CPU effect and the GPU
kernel change the same way.
2026-10-15 07:24:22 +02:00
Matej Kozlovský 217f0ffd59 GPU tests: print why the GPU didn't start, and fail with EFFECTCRAFT_REQUIRE_GPU=1 instead of skipping 2026-10-15 03:53:00 +02:00
Matej Kozlovský 295e2a3837 GPU: stop drawing a frame once the device has failed 2026-10-15 01:38:36 +02:00
Matej Kozlovský 2603a6f0e0 Export: render in parallel once the GPU stops for good 2026-10-15 01:30:54 +02:00
arnav-hiwarkar 68d928aff3 fix(render): preserve preceding effects in GPU Echo (#1120) 2026-10-14 13:42:59 +05:30
Marco Arnulfo 7df16a5e20 Effects: 4-Color Gradient keeps the layer's alpha with Blending Mode None (refs #1381) 2026-10-14 02:56:17 +02:00
Vikram Bhaskaran 2720ae5fe2 Wave Warp: cover the Top/Bottom edge pinning paths end to end (#1181)
The pinning regression only exercised All Edges (and Left Edge in the CPU
unit test), so the reported 'does not work with Top/Bottom Edge' had no
coverage to catch or clear it. This holds the pinned first/last row in a
CPU test at Direction 90, and adds CPU/GPU parity cases for Top (4),
Bottom (6), diagonal directions, and single-edge pinning on shape layers.
CPU pinning verified correct on main: the guards in dst_wave_pin/wave_pin
agree; the gap was that neither edge path was tested.
2026-10-13 23:40:32 +11:00
Brandon Thomas 9aabb5da4f Merge pull request #688 from MatejKozlovsky/gpu-resident-effects 2026-10-13 04:33:22 -04:00
Brandon Thomas 5281171282 Merge pull request #1204 from marcoarnulfo/fix/adjustment-track-matte 2026-10-13 04:29:49 -04:00
Brandon Thomas 0cfb563764 Merge pull request #1183 from MatejKozlovsky/cryptomatte-rank-speedup 2026-10-13 04:28:58 -04:00
Marco Arnulfo 3095217ce8 Track matte on an adjustment layer limits where its effects show (fixes #1201) 2026-10-13 08:42:14 +02:00
Kristian MyramandClaude Haiku 5.5 98796a29b8 #1063: the gradient ramp matches the CPU on the GPU, including transparent regions
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-13 02:48:46 +02:00
Kristian MyramandClaude Haiku 5.5 8eece41c7e #1063: keep the Gradient Ramp inside the layer's alpha
The Gradient Ramp wrote alpha 1.0 to every pixel, so a shape layer's transparent area filled up with
the ramp and the layer's bounds showed instead of the shape. The ramp now uses the pixel's own alpha
on the CPU and in the GPU kernel, as the #939 fix does for the noise effects. A regression test
checks that transparent pixels stay transparent at two Blend With Original values.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-13 01:37:03 +02:00
Matej Kozlovský 47dbd8dbd5 Cryptomatte: the rank planes are resolved once per evaluation and the GPU path reduces them on all cores, instead of formatting and looking up channel names for every pixel in a single-threaded loop (#473)
AuxChannels::crypto_rank_planes resolves a layer's (ID, coverage) planes once; crypto_ranks keeps its signature on top of it. The CPU effect and the GPU effect's aux image (effectcraft_effects::crypto_aux_image, rayon) index the planes per pixel. Output is bit-identical.
2026-10-12 13:29:03 +02:00
Matej Kozlovský f6497177b4 Merge main into gpu-resident-effects 2026-10-12 12:41:40 +02:00
Brandon Thomas 6b69881826 Merge pull request #686 from vbasky/fix/659-text-effect-bounds
Effects: text and shape layers run their stack over the whole layer region (#659, #658)
2026-10-12 04:21:15 -04:00
Brandon Thomas 7864ea41ae Merge pull request #951 from HEOJUNFO/fix-939-noise-mask
Effects: Fractal and Turbulent Noise stay inside the layer's alpha (#939)
2026-10-12 04:21:08 -04:00
Brandon ThomasandClaude Opus 5.5 0b2d85b811 Fix tests after the community merges: GPU Pixel Motion Blur without a host, timeline footage kind, effects doc
- GPU Pixel Motion Blur (#695) declined without a host; it now averages the shutter's
  frames like the CPU effect (tests_fx_time::without_a_host).
- add_item_keeps_footage_longer_than_the_comp_at_full_length (#798) built footage with
  the default kind (Still), which adds at comp length; it is a movie.
- docs/effects.md regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 04:18:51 -04:00
Matej Kozlovský bc6a145203 GPU: a layer's effect stack runs resident on the GPU and is placed directly, instead of a readback and re-upload around every GPU effect run (#687) 2026-10-12 09:47:28 +02:00
Matej Kozlovský d8ff1189dc GPU: the upload cache budget can be set per context and warns once when full, instead of evicting layer textures silently (#687) 2026-10-12 09:47:28 +02:00
Matej Kozlovský 9c5c187292 GPU: an Enc reuses the working textures it released at once instead of allocating new ones for every intermediate of a frame (#687) 2026-10-12 09:47:28 +02:00
Matej Kozlovský eec81bbe0e Render: an adjustment layer's footprint key ignores its effects, so a time-dependent effect (Noise) no longer re-keys it and the GPU re-uploads it every frame (#687) 2026-10-12 09:47:28 +02:00
Brandon Thomas 27e095e60e Merge pull request #702 from vbasky/fix/681-brightness-contrast
Match After Effects non-legacy Brightness & Contrast
2026-10-12 03:03:02 -04:00
Brandon Thomas 0ae711ba3a Merge pull request #713 from mjohnson7cd/fix/2081-rendering-hang
fix(gpu): cap GPU readback staging buffers to prevent memory exhaustion
2026-10-12 03:02:50 -04:00
Brandon Thomas 686280cc5f Merge pull request #711 from Ni-zav/fix/704-cylinder-axis-rotation-s20261011T035800Z-cf39
fix(effects): add XYZ rotation to CC Cylinder on CPU and GPU
2026-10-12 03:02:48 -04:00
heojunfoandClaude Opus 5.5 09b3042e20 Effects: Fractal and Turbulent Noise stay inside the layer's alpha (#939)
Masks are applied before effects, but the noise was composited with the
Opacity alpha alone, so a masked solid filled the whole layer. The result
is now multiplied by the original alpha on the CPU and on both GPU paths
(kernels.wgsl for the default settings, fx_noise.wgsl for the rest).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 10:31:31 +09:00
Mara Johnson c88d2b3a7f fix(render): prevent render hang and system lag (#2081) 2026-10-11 00:36:38 -04:00
Nigel Ihza Firdausy 4c81cf04f2 fix(effects): use portable WGSL discriminant guard 2026-10-11 11:07:36 +07:00
Nigel Ihza Firdausy f29436580e fix(effects): implement XYZ axis rotation for CC Cylinder on CPU and GPU 2026-10-11 11:06:51 +07:00
Vikram Bhaskaran a81c98d33c Match After Effects non-legacy Brightness & Contrast.
The modern curve used g = 2^(2c), so Contrast 100 crushed 0.25 to about 8/255 while AE is about 40/255. Brightness is now a pin-black-and-white power toward white or black, then a milder S-curve g = 1 + 0.53 c, fitted to kasper9n's AE grey ramps. Legacy linear mode is unchanged. The GPU kernel matches the CPU.
2026-10-11 14:31:10 +11:00
Vikram Bhaskaran 9ce7d12721 Pixel Motion Blur: synthesize the blur from motion vectors and honour Vector Detail (#535).
Time > Pixel Motion Blur fetched the layer at its shutter times and averaged the decoded
frames as they were, so fast motion rendered as doubled copies and the accepted Vector
Detail parameter changed nothing. Build a TimewarpPlan instead: every shutter instant is
decoded between the two source frames it falls between along a measured motion field — the
same block-matching and in-between synthesis Time > Timewarp uses, with a search radius
wide enough for full-frame displacements and the vector grid tightened from Vector Detail
0 (one vector per 32 px) to 100 (one per 2 px) — and the instants average into the blur.

CPU and GPU share the plan (fx_time renders it with its Timewarp step loop, declining to
the CPU when there is no host), so the existing GPU parity cases for the effect compare
the new path. Falling back to the old average is kept for layers without a time host.

A render integration test moves a textured block 12 px between source frames, renders
the straddling shutter, and asserts the output is neither the still nor the plain frame
overlay, lays trail coverage along the block's path, and changes with Vector Detail;
without the synthesis it fails at the overlay assertion.
2026-10-11 13:32:13 +11:00
Vikram Bhaskaran fa733bfb04 Effects: text and shape layers run their stack over the whole layer region (#659).
An authored layer's effect buffer spanned only its painted content — the glyph
bounding box for text, the drawn bounds for shapes — while the size the stack
measures from (effect_bounds) is the whole comp-sized layer rectangle. Tiling
and displacement effects computed correct output for pixels outside the painted
rectangle and then wrote them into the buffer that was too small, so CC Tiler
repeated only within the text box and CC Smear lost its liquid trail at the
glyph edge (#658). Buf::cover now grows the stack's input to the layer's
rectangle with transparent margins — what a sized source's buffer already is —
applied by run_effect_stack whenever an enabled video effect will run, and
natively on the GPU by reallocating and copying the texture. The placement and
the sized-source paths are unchanged; two regression tests (CC Tiler spans the
region, CC Smear trails past the text bounds) fail without the growth.
2026-10-11 12:25:29 +11:00
Claude ceb116d6d2 Issue fixes: #647 nested frame renders while dragging, #659 CC Smear/Tiler past text bounds, #652 relative footage next to the project, #651 GIF playback test 2026-10-10 23:55:23 +00:00
Claude 2aefe3e644 Effects: CC Smear and CC Tiler on text and shape layers reach past the content's box (#659)
A text or shape layer's effect bounds are comp-sized (as in After Effects),
but its buffer surrounds only its content, and each effect grows the buffer
itself when it needs room. CC Smear and CC Tiler never did, so a smear was
cut off where the glyphs end and tiles filled only the text's box.

CC Tiler now covers the whole layer rectangle; CC Smear grows by how far it
moves pixels (Reach x From->To), at most to the layer bounds, so footage
layers, whose buffer is their bounds already, are unchanged. CPU and GPU
alike.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QiAJeFttZp83Fh7YuzAR5f
2026-10-10 23:35:47 +00:00