2D Sprite Packing · Tilemaps · Custom Shaders

Sprite Sheet Frame, Padding, Extrusion & UV Atlas Sizing Calculator

Calculate exact sprite sheet dimensions, next Power-of-Two (POT) atlas sizes, tilemap extrusion bleed protection, GPU RAM footprint, shader UV steps, and copyable Godot AtlasTexture / Phaser frameConfig snippets.

All calculators
Start from a preset
Frame sizeWidth and height of a single sprite frame, in pixels.
Layout
Margin, padding and extrusionSpacing around the sheet, between frames, and bleed pixels around each frame.
Extrude pixels (prevents tile seam bleeding)+2px per cell axis
Power-of-two (POT) snapping
Pixel format
Final atlas size (POT)

512 × 512 px

Packed content 342 × 342 px. Square POT 512 × 512 px.

Exact packed bounds

342 × 342 px

Next POT size

512 × 512 px

Grid columns × rows

5 cols × 5 rows

24 used, 1 empty trailing cells

Uncompressed GPU memory

1.00 MiB (1.05 MB)

Indexed R8 + palette: 257.0 KiB

Packing efficiency37.5% frame pixels
Frames 37.5%Extrude 2.4%Padding and POT slack 60.1%
Flipbook shader UVs
Cell stride (uStep, vStep)0.132813, 0.132813
Frame UV size (uFrame, vFrame)0.125000, 0.125000
Atlas preview512 × 512

Engine import config

{
  "key": "player_atlas",
  "url": "assets/sprites/player_atlas.png",
  "frameConfig": {
    "frameWidth": 64,
    "frameHeight": 64,
    "startFrame": 0,
    "endFrame": 23,
    "margin": 3,
    "spacing": 4
  }
}
Export padded sheets directly from Aseprite or TexturePacker into Godot Engine, or compare tools in Best Sprite Sheet & Texture Packers.

Runs in your browser. No sign-up, nothing uploaded.

Exact sprite atlas dimensions equal 2 × BorderMargin + Cols × (FrameW + 2 × Extrude) + (Cols − 1) × ShapePadding, snapped optionally to the next Power-of-Two (POT) boundary for mipmap and hardware compression compatibility.

Built for pixel artists, 2D technical artists, and engine programmers working in Godot 4, Phaser 3, Unity 2D, GameMaker, Defold, and Aseprite. Preview your exact cell grid, eliminate sub-pixel tilemap seam bleeding with extrusion, and copy normalized UV step floats or engine JSON in one click.

Frame Presets
16×16 to 128×128 + Custom
Bleed Guard
0–4px Edge Extrusion
Atlas Output
NPOT & Safe POT (512–8192)
Code Export
Godot 4 & Phaser 3 JSON

Quick answer

How much padding and extrusion stops 2D tilemap and sprite bleeding?

For pixel-art tilemaps and bilinear-filtered 2D cameras, set Extrude to at least 1px (2px if generating mipmaps for zoomed-out cameras) and Shape Padding to 2px. Extrusion duplicates each tile's outermost border pixels outward into the gutter so floating-point UV rounding or GPU bilinear interpolation samples matching edge colors instead of transparent black or adjacent sprite frames.

How to Size a Bleed-Free 2D Sprite Atlas

  1. 1

    Select Frame Dimensions & Total Frame Count

    Pick a standard pixel grid preset (16x16, 32x32, 48x48, 64x64, or 128x128) or enter custom pixel dimensions alongside total animation or tileset frames.

  2. 2

    Choose Atlas Packing Layout Mode

    Use Auto Square POT to pack frames into the smallest square-friendly GPU texture, Fixed Columns for organized animation rows, or Horizontal Strip for single-row flipbooks.

  3. 3

    Configure Extrusion, Shape Padding & POT

    Add 1-2px of Extrude to prevent tilemap seam bleeding, 2px Shape Padding to separate neighbors, and toggle Force Power-of-Two (POT) if using mipmaps or BC7/ASTC compression.

  4. 4

    Copy UV Steps or Godot / Phaser Config

    Inspect the live proportional grid preview, verify atlas packing efficiency, and copy either custom shader uStep/vStep floats, Phaser 3 frameConfig JSON, or Godot 4 AtlasTexture region code.

Sprite Sheet Atlas Formulas, Extrusion & Engine Limits

Deterministic pixel geometry equations for Aseprite CLI, TexturePacker, Godot 4 TileSet/AnimatedSprite2D, and Phaser 3 WebGL atlases.

Governing Sprite Atlas Sizing Equations

When packing uniform grid frames with Border Margin (M), Shape Padding (P), and Edge Extrusion (E), every cell occupies an extruded footprint of (W + 2E) × (H + 2E) pixels:

Exact Width  = 2 * M + C * (W + 2 * E) + max(0, C - 1) * P
Exact Height = 2 * M + R * (H + 2 * E) + max(0, R - 1) * P
Next POT     = 2 ^ ceil(log2(Axis))

Where C is the column count and R = ceil(N / C) is the row count for N total frames.

Standard Sprite Atlas Reference Table

Frame SizeFramesGrid (C × R)Padding / ExtrudeExact Pixel SizeNext POT AtlasRGBA8 RAM (POT)
16 × 16 px64 tiles8 × 8P=2, E=1, M=1158 × 158 px256 × 256 px256.0 KiB
32 × 32 px48 frames8 × 6P=2, E=1, M=2286 × 214 px512 × 256 px512.0 KiB
48 × 48 px36 frames6 × 6P=2, E=1, M=2314 × 314 px512 × 512 px1.00 MiB
64 × 64 px64 frames8 × 8P=2, E=2, M=2562 × 562 px1024 × 1024 px4.00 MiB
128 × 128 px60 frames8 × 8P=4, E=2, M=21084 × 1084 px2048 × 2048 px16.00 MiB

Engine-Specific Pipeline Notes

  • Phaser 3 load.spritesheet Mapping: Phaser defines margin as the offset from the top-left texture corner to the first true frame pixel (M + E) and spacing as the pixel jump from the end of one true frame to the start of the next (P + 2 * E).
  • Godot 4 TileSetAtlasSource & AtlasTexture: Author sheets in Aseprite and pack with TexturePacker before importing into Godot Engine. Enable Nearest texture filter on CanvasItem nodes for crisp pixel art, or pair Linear Mipmap filtering with >= 2px extrusion for HD-2D hand-painted sprites.
  • Max Hardware Texture Caps: Keep mobile and WebGL 2 atlases at or below 4096 × 4096 (universal iOS/Android GPU ceiling); desktop Vulkan/D3D12/Metal GPUs support 8192 × 8192 to 16384 × 16384, though splitting into 2048 × 2048 multipacks improves streaming granularity.

Choosing Between Grid Sheets, Trimmed Atlases & Paletted Shaders

Match your atlas packing strategy to your renderer's batching rules and camera filtering.

Uniform grid sprite sheets shine when every character frame shares a consistent pivot or when custom HLSL/GLSL flipbook shaders step UVs mathematically without reading a per-frame JSON lookup table. When characters swing oversized weapons with wide transparent margins, pair grid tilesets with polygon-trimmed character atlases.

Why Tilemaps Bleed on Sub-Pixel Cameras

Even with Nearest-Neighbor filtering, non-integer camera zoom or smooth floating-point follow positions can land exactly on a texel boundary. A 1px extruded border guarantees both sides of the boundary hold identical RGB values, eliminating flickering hairline seams.

POT vs NPOT in Modern Game Engines

Modern Vulkan, Metal, D3D12, and WebGL 2 GPUs render Non-Power-of-Two (NPOT) UI sprites without penalty, but hardware block compression (BC7, ASTC 4x4) requires block-multiple dimensions and full mipmap chains behave most predictably on POT boundaries.

True Indexed-8bit Palette Rendering

Saving an 8-bit indexed PNG shrinks disk download size by 75%, yet standard engine importers still expand it to 32-bit RGBA8 in VRAM. To keep the 4x VRAM reduction on the GPU, store indices in a single-channel R8 texture and sample a 256x1 RGBA8 palette LUT in your fragment shader.

Compatible 2D Sprite Editors, Packers & Game Engines

Author, pack, and render bleed-free 2D sprite atlases with these verified catalog tools.

Verified Catalog Listings

Explore specs, pricing, engine compatibility, and AI provenance in our directory.

Aseprite icon

Industry-standard animated pixel art & sprite sheet editor

$19.99 once
TexturePacker icon

Polygon sprite-sheet packer, normal map & ASTC/BC7 CLI

$49.95 once
Godot Engine icon

MIT open-source 2D and 3D game engine with zero royalties

Free (MIT)
PixelLab icon

Pixel-native 4/8-dir character rotation & walk-cycle AI

Free trial / $9/mo TierGenAI
LDtk (Level Designer Toolkit) icon

Modern MIT 2D level editor by Dead Cells lead designer

Free (MIT)
Tiled icon

Universal GPL orthogonal, isometric & hex 2D map editor

Free (GPL-2.0+)

Sprite Sheet Grid & UV Atlas Calculator FAQ

What is the difference between Shape Padding, Border Margin, and Extrude?
Border Margin adds empty pixels around the outer perimeter of the entire sprite sheet. Shape Padding inserts empty transparent pixels between neighboring cells. Extrude copies each sprite's outermost edge pixels outward by 1-4px around every frame so bilinear filtering and mipmaps never bleed colors from adjacent frames or transparent gutters.
Do I still need Power-of-Two (POT) sprite sheets in Godot 4, Unity, or Phaser?
If your 2D sprites use no mipmaps and remain uncompressed RGBA8 (common for small pixel-art games), NPOT dimensions work fine on all modern GPUs. Turn Force POT ON whenever you enable mipmaps for zooming cameras, target legacy GLES2 hardware, or compress high-res HD-2D sprite atlases into BC7, ASTC, or ETC2.
Why should I avoid Horizontal Strip layout for large animation counts?
A 64-frame animation of 128x128px sprites arranged as a single Horizontal Strip produces an 8192x128px texture, exceeding the 4096px maximum texture width on many budget mobile GPUs and WebGL contexts. Auto Square POT packs those same 64 frames into a universally safe 1024x1024px sheet.
How do I use uStep and vStep in a custom flipbook shader?
In GLSL or Godot's shading language, compute the top-left UV of frame (col, row) as vec2(uOrigin + float(col) * uStep, vOrigin + float(row) * vStep), then add localUV * vec2(uFrame, vFrame). Separating uStep (cell stride including padding and extrusion) from uFrame (visible sprite width) prevents UV drift across padded sheets.
Does an Indexed 8-bit PNG use less GPU VRAM than a 32-bit RGBA PNG?
On disk and over network downloads, Indexed 8-bit PNGs are roughly 70%-80% smaller. In GPU VRAM, however, Unity, Godot, and Phaser decode standard PNGs into 32-bit RGBA8 (4 bytes/pixel) unless you explicitly import the sheet as a single-channel R8 uncompressed texture paired with a palette lookup shader.

More Free Game Dev Engineering Calculators

View all