Recommended number of Texture Atlases?

I am creatng a game with lots of sprites / textures. I am currently targetting texture atlas sizes of 2048 x 2048. How many of these atlases can I reasonably get away with using and still support low range / medium range hardware? Hoping someone has experience with this.

Thanks

1 Like

You can base your calculations on this data. You are likely using a color image with an alpha channel (32 bits per pixel, RGBA):
Size = 2048 x 2048 x 32 bits = 134,217,728 bits = 16,777,216 bytes = 16 MB
So, calculate how much memory you will need to keep all of this accessible.
10 atlases x 16 MB = 160 megabytes.

2 Likes

Thanks,
What I am actually trying to figure out is how much video ram is available to the average WebGL user in 2025.

I will post what I am going to do in case this helps anyone else:
A 4096x4096 texture atlas combined with KTX2 compression does not appear to be an unreasonable thing to implement. You can detect if 4096x4096 is supported by querying the WebGL extensions. If this is not supported, I will use a backup 2048x2048 texture atlas. The 2048 texture atlas will have fewer animations / dropped frames. All the animations will be loaded by external JSON and the total anmation time will be the same in both instances. The 2048 atlas just won’t be as smooth.

If these are not rendered 3D frames but 2D, then consider looking into Spine2D.
This will save a lot of space and memory, as there can be just one texture and a JSON file that describes all the animations. For example, a project with 100 animations and 1 texture might only take up 1 megabyte on disk and it will occupy very little RAM.

1 Like