Large atlas textures

Better to keep them large and have a higher file size or split them into multiple smaller atlases and therefore have to code conditionals with a higher file count?

This is a very open ended question, and the most accurate answer is “it depends”.

Using one massive file means you minimize draw call batching breaks, since the GPU uses one large file and hardly ever has to swap it, but you obviously waste VRAM if the atlas is too large.

Having many smaller atlas textures means you have more control over the memory, and you can load / unload textures when needed, to keep memory usage low.

So, once again, it depends on what you’re trying to achieve.

Edit: Do keep in mind that many phone GPUs and older GPUs cap the resolution of a texutre at around 4096Ă—4096 and the game will not work properly if you have textures above that.
There’s a handy list of what GPUs support what texture size at max:

1 Like

Might have to split it in this case. I’ve got 3 menus for the selection of card decks to be used in the game. The first 2 atlases have been sectioned into 300 x 200 images for each deck with the most images needed so far being 24. This menu needs 94 which be be over 4096 if I use the same size sections. Shouldn’t be an issue as the logic to check which of the 2 atlases will be simple enough. Rest of the code will be the fun part as selection will be up to 5 unique heroes from a selection of 24 with 70 variations of the 24. Hence 94 images.