Tileset Extruder

Seams, flickering lines or gaps between tiles when the camera moves or zooms are caused by texture bleeding. Extruding every tile's border pixels fixes it without changing how your tiles look.

Drop a tileset here, click to choose one, or paste with Ctrl+V.
Fixes lines and gaps between tiles. Nothing is uploaded.

How to extrude a tileset

  1. Drop your tileset image and enter its tile size. If the image already has a border (margin) or gaps between tiles (spacing), enter those too, so every tile is read correctly.
  2. Set Extrude to 1 px (2–4 px if you use mipmaps or zoom out a lot).
  3. Download the new image and replace the old tileset with it. Use the margin and spacing values shown in the box.

Other causes of tile seams

How the numbers work

With an extrusion of E and an extra transparent gap of G, each tile gets an E-pixel copy of its own edge on every side.

The first tile then starts at E + G pixels from the image border (the margin). Neighboring tiles are 2E + G pixels apart (the spacing). The tile size itself does not change.

FAQ

Why do lines appear between my tiles?

When the camera is at fractional positions or zoom, the GPU samples texture coordinates right at a tile's edge and can pick up pixels from the neighboring tile (or transparent spacing). That shows up as thin lines or flickering seams.

What does extruding do?

It copies each tile's outermost row and column of pixels outward by 1 or more pixels. If the GPU samples slightly outside the tile, it gets the same color instead of the neighbor's, so seams disappear.

What margin and spacing should I use afterwards?

The tool shows them: margin = extrude + gap, spacing = 2 × extrude + gap. Enter these in Tiled's tileset properties, Phaser's addTilesetImage, or Godot's atlas Margins and Separation.

Does this change my Tiled maps?

No. Tile indices stay the same; only the image and the tileset's margin/spacing values change. Update the tileset image and those two values and existing maps keep working.

Is 1 px of extrusion enough?

For pixel-perfect cameras, yes. If you use mipmaps or strong zoom-out, use 2–4 px.