mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-14 19:27:05 -04:00
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.