Why 2D Pixel Art Sprites Show Seams in Godot 4 and Unity, and How Atlas Packing Fixes Them
Pixel-art sprites packed edge-to-edge on a sprite sheet can show hairline seams or dark fringes when the camera scrolls at fractional positions, sprites scale, or tilemaps rotate. The cause is GPU texture sampling, where floating-point UV coordinates can land just across a texel boundary and pull in pixels from neighboring sprites or transparent gutters. The article recommends a fix combining 1px edge extrusion, which duplicates each sprite's outer edges and corners into the padding, with MaxRects-BSSF atlas packing. It also notes that Godot and Unity use different origin conventions, so rectangles must be converted to avoid vertically flipped slices. Finally, it describes generating Godot 4 .tres SpriteFrames resources and Unity or Phaser JSON descriptors from a browser-based packer.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in