# Size of texture on Video memory

polycounter lvl 10
Offline / Send Message
polycounter lvl 10
In my search for the answer to how large a dxt1 compressed 1024x1024 texture was in video memory, I found the answer (512kb) and some basic math's. But because I don't want to break out the calculator every time I want to know the size a texture will end up in memory I thought it best if I take 5 minutes to commit a few sizes to...memory .

Please correct me if I am wrong.

Uncompressed
1024x1024 4MB
2048x2048 16MB

Dxt1
1024x1024 512kb
2048x2048 2MB

Dxt5
1024x1024 1MB
2048x2048 4MB

I assume mip-mapping isn't calculated already so all these values would have another 50% ontop if they have mips.
Knowing the size of 3dc/BC5 would be useful too, the wiki page was confusing for that one.

## Replies

• Offline / Send Message
polycounter lvl 8
Might also want to note that a 4Mb 1024x1024 is RGBA (has alpha) without alpha it's 3Mb. (8-bit)

According to the wiki, 2:1 compression ratio from an 8-bit source, so 1.5Mb for a 1024x1024 3DC? (as I doubt the source normal maps have an alpha channel) Multiply by 4 for double the size, so 6Mb for 2048x2048 3DC.
• Offline / Send Message
polycounter lvl 6
JamesWild wrote: »
Might also want to note that a 4Mb 1024x1024 is RGBA (has alpha) without alpha it's 3Mb. (8-bit)
With padding it is most likely still 4MB (memory access).

You need to consider mipmaps to, therefore
2048^2 = 16 MB + 4MB + 1MB + 0.25MB ~= 21 MB

Not everything is hold in real videomemory, parts are in the system memory which will be uploaded on demand.
• Offline / Send Message
polycounter lvl 8
Yeah mipmaps were noted in the first post... thanks for the further input. Forgot that most implementations use padding for the RGB format.
• Offline / Send Message
polycounter lvl 6
Opps, you're right :-)
• Offline / Send Message
polycounter lvl 11
How much memory does my texture take up?
Compression Memory consumption
RGB Compressed DXT1 0.5 bpp (bytes/pixel)
RGBA Compressed DXT5 1 bpp
RGB 16bit 2 bpp
RGB 24bit 3 bpp
Alpha 8bit 1 bpp
RGBA 16bit 2 bpp
RGBA 32bit 4 bpp
To figure out total texture size: width * height * bpp. Add 33% if you have Mipmaps.