Status: Accepted (2026-11-27, WP-E0)
A peer’s drag must be visible live without sending ops per frame: drags apply nothing until pointer-up, and presence carries the drag affine (ADR 0007, editor.md). Locally the engine already previews drags on the GPU (u_xf* uniforms applied to selected instances), at zero CPU cost per frame. render-engine.md planned the same for peers: “up to 4 remote affines as uniforms and flag bits per instance selecting the slot”. E0 must keep the render path unchanged: buffer formats, draw calls, chunking and LOD, with bench parity.
1 + slot (0 = not in a remote drag). No new buffer and no format change; byte 0 keeps selected/hidden. Two bits would be enough for 4 slots; a whole byte keeps CPU writes trivial.VS stays the POC vertex shader, byte for byte. VS_REMOTE is the same source plus u_rxMask (bit s = slot s live), u_rxA/u_rxS/u_rxT[4] and one branch after the local drag preview: if the instance is not locally dragged and its slot is live, it gets the same p' = A + (p - A) * S + T transform. The renderer links VS_REMOTE lazily on the first frame with a live slot (one-time compile, a few ms) and draws with it while remoteMask != 0; with no remote drag it draws with the unchanged program, so the default GPU path costs nothing. (A first version used one shader with a uniform-gated branch; headed sweeps hinted at ~0.3 ms more worst-zoom GPU time, so the branch moved into the variant.)Scene.setRemoteSlot(ids, slot) / clearRemoteSlot(slot) write byte 1 and a per-chunk counter cRem (4 B per chunk) and mark those chunks’ flags dirty (one partial flags upload when a drag starts and ends). Renderer.setRemoteXf(slot, affine | null) only sets uniforms: nothing is uploaded per presence update. Engine wraps the three calls.docs/perf/e0.md): fps/GPU parity under the interleaved gate (ADR 0015); the parity replay gives 44/44 bit-identical editor states and 44/44 identical stage screenshots; a remote-slot preview renders pixel-identical to moving the same shapes for real. Engine memory +4 B per chunk (0.004 B/primitive) and one more linked program once a peer drags.useProgram runs every frame already).