texture vram calculator
simple javascript tool to calculate the VRAM size of a texture given its dimensions, organized in a nice table by texture format, as I got annoyed doing this calculation manually all the time
the "real size" column is the size of the texture after block compression is done, which will round up to the nearest block size multiple. the "+mipmaps" column includes mipmaps that halve in size until both dimensions of the source image are 1.
you can use "k" as a suffix to multiply the input by 1024, e.g. 2k is 2048.
| Format | Real size | VRAM | +Mipmaps |
|---|---|---|---|
| Uncompressed RGB/RGBA | |||
| BC1, BC4 | |||
| BC2, BC3, BC5, BC6, BC7 | |||
| ETC1, ETC2 (RGB, R11 EAC) | |||
| ETC2 (RGBA, RG11 EAC) | |||
| ASTC 4x4 | |||
| ASTC 5x4 | |||
| ASTC 5x5 | |||
| ASTC 6x5 | |||
| ASTC 6x6 | |||
| ASTC 8x5 | |||
| ASTC 8x6 | |||
| ASTC 8x8 | |||
| ASTC 10x5 | |||
| ASTC 10x6 | |||
| ASTC 10x8 | |||
| ASTC 10x10 | |||
| ASTC 12x10 | |||
| ASTC 12x12 |
notes:
- it seems like GPUs don't support RGB textures without alpha at 3 Bpp, but rather you have to convert them to RGBA before they hit the GPU
for documentation on the various texture formats, there's...
- The Khronos Data Format Specification, section 17. this should be taken as the source of absolute truth for all the formats, even if it's long and doesn't have many pretty pictures
- Texture Compression Techniques, which goes over S3TC, ETC, and ASTC in a pretty concise manner compared to all the standards, along with some pretty pictures
- nathan reed's blog post for a higher level overview on all the S3TC formats
of course, wikipedia has articles for S3TC, ETC, and ASTC, as well as some other texture compression formats, should you want to seek out more information via its references.





















