Flexy Blogs

Texture Atlases and Draw Calls: Game Optimization Basics

Texture Atlases and Draw Calls: Game Optimization Basics
Photo by Anthony Roberts on Unsplash

Every separate object and material can add work for the CPU and GPU. Understanding draw calls, and how atlases, batching and instancing reduce them, helps keep frame rates stable.

When a game slows down, the cause is not always too many polygons. Often the problem is how many separate things the engine asks the graphics card to draw each frame. Each request is called a draw call, and each one carries overhead. Reducing unnecessary draw calls is one of the most effective optimisations, especially on mobile and lower-end hardware.

What a draw call is

To render an object, the CPU prepares data and sends a command to the GPU: draw this mesh with this material. Changing materials, textures or shaders between draws requires additional state changes. Thousands of small, separate objects with different materials can keep the CPU so busy preparing commands that the GPU waits, even if each object is simple.

Share materials

Objects that use the same material can often be drawn together. The first step is simply to avoid unnecessary unique materials: if twenty props use the same shader and could share one texture set, give them one material.

Texture atlases

A texture atlas packs several textures into one larger image. Many objects can then share a single material, with each object's UVs pointing to its part of the atlas. Atlases are common for UI, 2D sprites, foliage and sets of small props.

Considerations:

  • Leave padding between regions to prevent colours bleeding at lower mipmap levels.
  • Keep texel density consistent across packed assets so they look like they belong together.
  • Group assets that appear together; an atlas containing textures for objects never seen at the same time wastes memory.
  • Tiling textures, which repeat across surfaces, do not work inside a standard atlas.

Batching

Engines can combine objects to reduce draw calls:

  • Static batching combines non-moving objects that share materials into larger chunks at build or load time. It costs memory but reduces CPU work.
  • Dynamic batching combines small moving objects each frame. It has limits and costs, so check whether it helps in your engine.

Some engines offer more advanced systems that reduce the cost of draw calls by batching based on shader variants; check your engine's documentation for current recommendations.

GPU instancing

When you need many copies of the same mesh with the same material, such as grass, trees, rocks or crowds, instancing draws them all in one call, with per-instance data such as position and colour. It is extremely efficient for repeated objects.

Other ways to reduce draw calls

  • Merge static meshes that are always seen together, such as building parts.
  • Culling: do not draw what the camera cannot see, using frustum and occlusion culling.
  • Level of detail: simpler distant objects can also use simpler materials; see LOD explained.
  • Limit real-time shadows and lights, which can multiply the number of passes.
  • UI: group UI elements carefully; frequently changing elements can force large parts of the UI to rebuild.

Always profile first

Optimisation without measurement wastes time. Use your engine's frame debugger and profiler to see draw call counts, batch counts and whether the CPU or GPU is the bottleneck. Profile on your target hardware, especially the lowest-spec device you support, because a desktop development machine hides problems.

Plan it into the art pipeline

Material counts, atlas rules and texel density belong in your art guidelines and design document from the start. Agreeing these early is much cheaper than reworking hundreds of assets late in production. Engine choice affects the tools available; see Unity, Unreal and Godot compared.

FlexyBlogs Editorial Team

Practical guides from the FlexyBlogs editors
Articles under this byline are researched and written by the FlexyBlogs editorial team. We link to primary sources such as government agencies, standards bodies and official documentation, and we update articles when guidance changes. Some drafts are prepared with the help of AI writing tools and are edited and fact-checked by a member of the team before publication. Spotted an error? Tell us through the contact page.
View all posts

0 Comments

No comments yet — be the first to share what you think.

Leave a reply

Your email address is never published.