mirror of
https://github.com/storytold/texturecraft.git
synced 2026-11-21 23:10:43 +01:00
A stack with a neighbourhood filter (blur, high pass, bevel, glow...) made a recomposite spread over frames many times slower than the same recomposite in one call: every chunk filtered its own surroundings again, and on a machine with many threads the filter's per-texel parallel steps cost more to hand out than to run on a region of a few tiles. - Neighbourhood filters split their per-texel work into tasks of at least 16384 texels. Each texel is computed on its own, so results do not change. - Session::update_for tells the compositor which dirty tiles follow the chunk in its block (up to 64). The compositor filters the chunk and those tiles at once and keeps the fields for the composites that follow, compared by everything the stack reads, and drops them at the end of the pass, after an edit, and under a live stroke. Results are identical to the one-call composite: tests cover cold, warm and partly evicted hot-layer caches, an edit mid-pass and a live stroke. perf::bench_sliced_filters_4k times both paths.