Configuration
.fpsheet
Extrusion is set via the project file. There is no dedicated CLI flag.
1 is enough for bilinear filtering; 2 is sometimes used with mipmapped sprites.
How it works
A 4×4 checkerboard sprite extruded by 1 pixel grows to 6×6 in the atlas. The 1-pixel border around it is a copy of the sprite’s edge pixels.frame rect in the data file still points at the inner 4×4 region. The runtime does not need to know extrusion happened.
Examples
Prevent bleeding with bilinear filtering
At the default shape padding of 2, an
extrude value of 2 means the duplicated edge sits exactly adjacent to the padding gap — no atlas space is wasted between the extruded border and the next sprite.Mipmapped textures
For textures with mipmaps, use a higher extrude value:Technical details
Extrusion is applied during pre-processing, after trimming and before packing. The sprite’s pixel buffer grows byextrude pixels on every side; the packer sees the enlarged size.
frame, spriteSourceSize, and sourceSize in the data file all reflect the original (pre-extrusion) dimensions. The atlas texture contains the extruded version, but the frame rect selects the inner region that excludes the duplicated border.
Extrusion does not change trim behavior: if trimming is active, the sprite is trimmed first, then the trimmed result is extruded.
When to use extrusion
Extrusion is essential when:- Your renderer uses bilinear or trilinear filtering
- Sprites are rendered at non-integer scales
- Sprites are rendered at sub-pixel positions
- Your atlas will be mipmapped
TexturePacker calls this setting “Extrude” and applies the same edge-repeat logic. Atlas output with matching
extrude values is visually and functionally equivalent.