58 · Rendering · 2D and 3D

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.

←↑↓→ or WASD move1 atlas on/off · 2 paddingD-pad to collect

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.

Gems 0Texture switches 100

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.

44 words · one sentence to paste as is

Where it's used

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.

Related concepts

New concepts, in your inbox.

One short email when we add new concepts, plus our weekly roundup of AI tools for game devs. Unsubscribe any time.