Commit Graph
10 Commits
Author SHA1 Message Date
Tanish Manku f7d90f361c feat(engine): filters switch on and off, reorder, copy and paste, and filter presets (M5)
A filter list entry carries an enabled switch (FilterEntry, flattened into the filter's
own object, so older files open unchanged); evaluate and the HTML export leave switched-off
filters out, so every renderer and export draws them as absent. New filter.* commands:
move, enable, remove, copy, paste, and presets (list, save, apply, rename, delete, export,
import) kept in the session like brushes. XFL import keeps disabled filters, switched off.
Classic tweens pair lists that include switched-off filters.
2026-11-13 19:28:15 -07:00
Tanish Manku a9e48b1184 feat(doc): warp meshes on shapes and bitmaps, bent by pins (rigid MLS), pins tween (M7) 2026-11-12 19:52:31 -07:00
Tanish Manku f78ae40e89 feat(doc): colour effect styles as one exact colour transform, rendered, exported and edited everywhere (M2) 2026-11-11 04:50:41 -07:00
Tanish Manku f375849413 perf(gpu): upload only the tile headers when the GPU bins, bin from 32,768 edges, cheap hairline rejects (M3)
Mapping the GPU-binned index at creation zeroed and copied its whole room for entries on
the CPU; the headers and op headers now go through the queue and the rest starts zeroed
on the GPU. 50k shapes at 4K, direct: 50 -> 24 ms (CPU-binned: 121 ms).

Auto bins on the GPU from 32,768 edges: forcing it on every 512 px stage tile made the
1,000-shape 4K stage 1.9x slower and the 10k-shape one 1.3x (per-tile pass set-up); with
the threshold the tiled stage never loses (10k at 4K 10.5 -> 10.0 ms, 50k 63.6 -> 38.4 ms).

A hairline segment whose box is out of reach of a pixel is skipped before the distance
(same coverage). gpu_bench compares CPU and Auto binning and checks budgets (--check).
2026-11-10 20:23:56 -07:00
Tanish Manku 0fbf8c5d0f feat(render): hairlines for outline mode, and integer tile backdrops in the GPU binning (M3)
Outline mode (an outlined layer, onion skin's outlines) draws hairlines straight from
the flattened path: coverage 1 - the distance to the nearest segment, one edge per
segment where a stroked hairline was four plus a disc at every bend. Exact for axis-
aligned lines, no darkening at overlaps and joins. The GPU stage computes the same.

The binning's per-row float backdrops become one integer per tile plus a piece on the
tile's left edge wherever the outline crosses it (Vello's backdrops and y-edges), which
lets the GPU compute the same lists without float atomics. Parity unchanged.
2026-11-10 20:23:55 -07:00
Tanish Manku 863e8af60a fix(gpu): tests and bench build with merge drawing's Shape.merge; ADR renumbered to 0032 after merge drawing took 0031 (M3) 2026-11-09 20:45:47 -07:00
Tanish Manku 5bed9916dd fix(gpu): the stage shaders build with Direct3D's FXC; no software adapters for the stage (M3)
FXC must unroll loops that index vector components and could not unroll
blend's and adjust's, so the GPU stage never started on a DX12 window.
Both are vector code now, with the same arithmetic order. The parity
suite passes on DX12 as on Vulkan. A software adapter (WARP, llvmpipe)
is refused for the stage, since the CPU oracle is faster;
GpuRenderer::software() opens one for tests. The self-test now compares
against the oracle (bitmap and filtered symbol included) and says where
it went wrong. The benchmark gains a filtered sample and 200 bitmaps.
2026-11-09 19:48:49 -07:00
Tanish Manku eb85dd2411 feat(gpu): GPU stage draws into the window's textures, no readback; ADR 0029 (M3)
The GPU stage shares eframe's wgpu device (egui_wgpu::RenderState) and
draws each stage tile into a storage texture the shell registers with
egui as it is. Fallbacks: a headless device with readback (window on
OpenGL), then the CPU oracle. Every call runs in thread-local error
scopes; nothing is installed on the window's device; a work bound per
dispatch guards the driver watchdog.

The engine stays GPU-free: Raster::Native carries an opaque image, cached
under its own 384 MB budget; only the shell downcasts it.

perf, gpu_bench on RTX 5090 (Vulkan), 32 threads:
  4K, 1,000 shapes: CPU 16.2-19.6 ms, read-back 8.4, direct 2.1-2.4 ms
  4K, 10k shapes:   CPU 25.8-28.1 ms, read-back 23.2, stage tiles 10.2 ms
  4K, masked 10k:   CPU 74.8-80.0 ms, stage tiles 10.9 ms
Binning stays on the CPU (ADR 0029: not the bottleneck as stage tiles).
2026-11-09 16:58:49 -07:00
Tanish Manku 9173796835 docs: GPU stage ADR is 0019, as assigned by the lead (M3) 2026-11-09 03:44:33 -07:00
Tanish Manku 2f3ab271d9 feat(gpu): wgpu stage renderer over the oracle's fills, with parity tests (M3)
New crate anicraft-gpu (L3): the CPU oracle prepares the fills
(render::plain_fills: flattening, strokes, shaders and gradient tables,
culling), binning sorts edge pieces into 16x16 tiles with per-row
backdrops, and one compute pass computes each pixel's exact area coverage
and composites in display-list order. Masks, groups and bitmaps are
handed back (NeedsFull) for the CPU to draw.

Parity on an RTX 5090 (Vulkan): max 1/255, mean < 0.0001/255 on the
sample and stress scenes; tests skip with a message without an adapter.
2026-11-09 03:44:28 -07:00