mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-06 02:20:50 +00:00
A tile boundary that lands exactly on an output pixel centre puts the tile fraction at exactly 0 or 1, and the sample position at the source's geometric edge — where sample_bilinear mixes in half a texel of the transparent outside. The fold column comes out half-faded: a visible seam line along the mirrored boundary, which sweeps the tile as Tile Center animates across pixel centres (#2820). Both the CPU path and the GPU kernel switch to the clamped sampler, which repeats the edge texel there; interior samples are untouched, and the default single-tile identity mapping already sampled texel centres. The regression test puts the folds exactly on pixel centres (tileWidth 50%, centre on the layer, mirror on) and asserts the fold columns stay opaque and equal the edge texels they mirror — it fails on the unfixed code at alpha 0.5. Fixes #2820 Co-authored-by: rahul05ranjan <11793455+rahul05ranjan@users.noreply.github.com>