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
![:) :)](https://polycount.com/plugins/emojiextender/emoji/twitter/smile.png)
.
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
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.
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.
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.