QUICKUPSCALE

PRACTICAL GUIDE

Sprite sheet tools and workflows

Extrude sprite edges and test the limits of bleed prevention

Start here

Keep the 6×4 content rectangle and 2px per-side gutter in sprite-sheet padding. Extrusion 1 copies the inner ring and corners; extrusion 2 fills both rings. Neither repairs an incorrect texture coordinate or an arbitrarily large sampling footprint.

Expected result:

Matching 20×16 outputs with transparent, one-ring and two-ring gutters, plus explicit limits on what those copies establish.

What you need

Use the original CC0 21×16 diagnostic sheet. Declare cells 6×4, margins left 2/top 1/right 4/bottom 3, and gaps horizontal 3/vertical 4.

Tested with: Actual production padding-2/extrusion-0,1,2 exports in local Cloudflare/workerd, desktop Chrome 154/macOS; independent decoded-plane/Pillow checks and a separate Node 24 software sampling model. No GPU/filtering claim.

1. Export and compare both copied rings

Keep Padding per side at 2. Export with Extrusion 0, then 1, then 2. All three outputs stay 20×16, with content at (2,2), (12,2), (2,10), (12,10). Extrusion consumes the existing gutter; it does not enlarge the content rectangle.

Actual one-pixel edge extrusion inside two-pixel gutters
Actual extrusion-1 download: copied inner edge and corner pixels, with a transparent outer ring.
Actual two-pixel extrusion filling the allocated two-pixel gutters
Actual extrusion-2 download: both rings filled from each cell's own nearest edge.

2. Check alpha and corners, not only solid edges

Every copied sample, including corners, comes from the same source cell. A decoded edge with alpha 128 remains alpha 128; extrusion does not make it opaque. Alpha-zero hidden RGB is copied from the decoded plane, which can already differ from raw PNG channels.

All actual output pixels matched the independently captured decoded source and ring oracle. Keep the extrusion-1 and extrusion-2 manifests with their PNGs. They describe geometry, not a renderer configuration.

3. Read the software sampler as a model

The source pack's sample.mjs uses integer texel centers, encoded-channel premultiplied bilinear arithmetic and explicit black/white composition. At (7.5,3), transparent padding gives alpha 127.5 while the copied opaque edge gives 255. At (7.5,5), alpha 64 becomes 128, not 255.

Those are controlled source-model results, not measured browser texture interpolation. Run node --test fixture.test.mjs in the extracted padding-trim-workflows folder with Node 24 to check the finite model and original fixtures.

4. Check failures extrusion cannot repair

The model's wrong coordinate (12,3) still selects the neighboring tile. At (9.5,3), the footprint exceeds the inner ring: the extrusion-1 sample is transparent, while extrusion 2 mixes the copied colors of two tiles. More extrusion is not a substitute for correct frame rectangles.

Extrusion greater than padding is invalid. Mipmaps, sRGB decoding, fractional cameras, UV conventions and GPU renderer settings require their own tests. Integer crop equality does not establish seam-free game rendering.

Sources and next steps