Texture atlas
Many images packed into one texture.
Every separate texture means the GPU switches state, and switches are a common reason a 2D game slows down. Packing sprites into one big sheet lets many of them draw together. Leave padding between sprites and keep mipmaps in mind, or colours from neighbours bleed into edges.
Try this: Collect the gems. With separate textures the GPU switches texture for each sprite and it is choppy. Switch to One atlas: smooth. Then turn padding off to see seams bleed into the floor.
Separate textures: the GPU switches texture for every sprite and the frame rate drops.
Prompt bit
Works for 2D or 3D in any engine (Unity, Unreal, Godot, web). Paste the short one for a quick fix, or the detailed one when you want it done properly.
Pack sprites into texture atlases: group sprites drawn together into one sheet up to 4096 px, add 2 px padding with extruded edges so filtering never bleeds neighbours in, and keep rarely used giant images out of shared atlases so memory is not wasted.
Use texture atlases for sprites and UI (2D or 3D; Unity Sprite Atlas, Godot AtlasTexture or TexturePacker, Phaser texture atlases, Unreal Paper2D). Group sprites that are drawn together (one level's tiles, one character's animations, one UI screen) into the same atlas, max 2048 or 4096 px depending on the target. Pack with 2 px padding and extrude edge pixels into the padding so bilinear filtering and mipmaps do not pull in neighbouring colours. Keep sprite sizes power-of-two-friendly where mipmaps are used. Do not mix rarely used giant images with common small ones. Check with the frame debugger that batches actually merge. For pixel art use point filtering and no mipmaps.
Where it's used
- 2D games: characters, tiles and effects
- UI: icons and panels
- Fonts: glyph atlases
- 3D games: props sharing one material
- Mobile games: fewer draw calls and less memory
Common mistakes
No padding so edges show lines from neighbours, one giant atlas with everything so memory is wasted, atlases split so sprites drawn together never batch, and mipmaps on pixel art.
Writing this with an AI assistant? See our best AI coding assistants for game developers.
Missing a concept? Request one.


