Skip to content

Edge Correction

Lea Hayes edited this page Oct 3, 2017 · 2 revisions

Home | Tilesets

Bleeding will usually occur at the edges of tiles due to texture filtering and/or mip-mapping. Two popular ways to reduce the visibility of such artifacts is to either inset UV coordinates by half a texel, or to add borders around the edges of each tile in your atlas.

As depicted above, lines appear between tiles which often flicker when movement occurs (camera movement, zooming, tile movement, etc). The effects of edge bleeding can sometimes be counteracted by carefully packing tiles adjacent to other similar tiles.

Why does bleeding occur?

Edge bleeding occurs when multiple tiles are packed into an atlas texture because pixels are incorrectly blended between adjacent tiles.

Each of the following can lead to this undesirable effect:

  • Texture filtering

  • Mip-mapping

  • Lossy texture compression

  • Use of Non-Power-Of-Two (NPOT) atlas texture

  • Sub-pixel placement of tiles

Tip - Where possible avoid using lossy texture compression when working with tileset atlas textures. If you switch the texture inspector into advanced mode you can pick from a range of texture formats on a per platform basis.


< Previous Page | Next Page >


Related Topics:

  • Poor texture alignment in tileset brushes
    Atlas tile textures do not align properly when painted onto a tile system. There are a number of causes for such issues, this troubleshooting guide covers the most common reported difficulties.

Child Topics:

  • Without Edge Correction
    Specifies that edge correction should be disabled. This can be useful when blocky "pixel-like" graphics are desired when using point filtering, though edge correction is generally more effective.

  • Edge Correction with Borders
    Adding borders around the edges of each tile is one of the most effective ways to reduce artifacts that are caused by bleeding. This works because the border pixels are blended with the tile pixels when filtering or mip-mapping is used.

  • Edge Correction with Delta and UV Inset
    One of the most common ways to reduce bleeding at the edges of tiles is to inset tile UVs by a small amount; half a texel tends to be quite effective.

Source: topics/Edge-Correction.md

Clone this wiki locally