Game dev
Saved & recent

Texture bleeding

Related terms: atlas padding, edge extrusion, seams, texture filtering

Unwanted colors appearing along texture or sprite edges when sampling reaches neighboring image data. In a texture atlas, filtering or small mip levels can mix pixels from adjacent sprites.

Padding and extruding edge pixels around each packed image give the sampler room to blend the correct colors. Use enough padding for the intended mip levels and check UVs and filtering. Clamping the whole atlas does not protect the edges of each sprite inside it.

Further reading
Godot Engine: Using TileSets
touching sprites sampling footprint extruded edge copied column
The highlighted footprint uses the same sample point in both atlases. The filter blends the two nearby texels. Copying the orange edge into the extra column keeps both texels orange.

View in the full Game dev collection