Sign in to follow this  

A few questions about compressed textures

This topic is 4015 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there, my friend asked me to post here some questions about DXT texture formats for which he wants to know answers... :) a) What amount of memory is saved, when using the DXT1-X format... b) and how much memory is saved, if I use an eight-bit palletized textures. Is it really 75% or not? c) What is the speed of the DXT textures loading compared with the other formats? d) When are DXT textures decompressed in the memory? At the moment of rendering or earlier? e) Are there any another interests of using DTX textures? System resources, decompression speed, ... Thank you very much for your answers. EDIT: Please use a more appropriate subject line in future. [Edited by - jollyjeffers on December 13, 2006 9:43:19 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Bummer
a) What amount of memory is saved, when using the DXT1-X format...
What is your point of reference? There are several uncompressed formats that you could start from [smile]

32bit XRGB down to DXT1 is either 6:1 or 12:1 compression (I forget which off the top of my head).

Quote:
Original post by Bummer
b) and how much memory is saved, if I use an eight-bit palletized textures. Is it really 75% or not?
Pretty much - you store a single 8bit value for each pixel instead of 4, but you need to consider the storage space required for the palette.

Also bare in mind that palettised textures aren't usually supported by hardware and that some will 'decompress' them to regular ARGB textures in the driver.

Quote:
Original post by Bummer
c) What is the speed of the DXT textures loading compared with the other formats?
If you have to compress them during loading then they'll be a lot slower, if they were compressed on disk then the advantage is simply a case of having less data to stream into memory so they'll probably be faster.

Quote:
Original post by Bummer
d) When are DXT textures decompressed in the memory? At the moment of rendering or earlier?
During rendering, the whole point of DXT is that the decompression is handled in hardware...

Quote:
Original post by Bummer
e) Are there any another interests of using DTX textures? System resources, decompression speed, ...
One (DXT4 or DXT5?) can be quite convenient when storing normal maps.


There is quite a bit of information in the SDK documentation that you (or your friend) should read through. Click here and start reading.

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by Bummer
a) What amount of memory is saved, when using the DXT1-X format...
b) and how much memory is saved, if I use an eight-bit palletized textures. Is it really 75% or not?
c) What is the speed of the DXT textures loading compared with the other formats?
d) When are DXT textures decompressed in the memory? At the moment of rendering or earlier?
e) Are there any another interests of using DTX textures? System resources, decompression speed, ...

a) Compared to what? Compared to a 32 bit texture? DXT1 is 6:1, DXT2-5 is 4:1.

b) Most cards don't support P8 texture anymore. My Geforce3 exposes it on D3D8, but not on D3D9. It would have been 75% though, yeah. Since you can't rely on it being there, it's not really worth supporting. Plus, you have 1 palette to use across all stages.

c) They'll load faster, if used correctly. They're smaller, so they'll load faster. PNGs are compressed on disk, but need to be uncompressed at load, and sent to the card as uncompressed. DXT textures are less to load and less to transfer to the card. DDS files can contain mipmaps. You want to include mips. If you don't, D3DX will uncompress the DXT, generate mips, and compress each level, which will be slow.

d) DXTs are stored on the card compressed. They're decompressed in small chunks as needed during rasterization.

e) DXT1 stores colors as 16 bit, so you might see a bit of quality loss, depending on the texture. Older nVidia hardware interpolates it as 16 bit too, instead of as 32 bit after decompression.

Share this post


Link to post
Share on other sites
a)Dxt1 compresses to 4bit/pixel, compared to 32bit/pixel it's 1:8, Dxt3 and 5 compress to 8bit/pixel (basically the same colorcompression as dxt, but additional 4bit/pixel for alpha) so it's 1:4

b)dont use it, it's obsolete

c)about 4 or 8times faster if u load already compressed textures

d)usually on loading to the texture-caches

e)u can use the same amount of memory but make the resolution twice as it is with 32bit textures or keep them as they are, but use a lot more textures, kinda nice thing :)

Share this post


Link to post
Share on other sites
Quote:
Original post by MagicCarpet
How fast can display graphic card DXTs ? is it faster or slower than classical formats (png, jpg...) ?
Do you mean rendering performance?

PNG and JPG don't exist as far as the hardware is concerned - it'll either see compressed (DXT) or uncompressed (BMP) formatted data. In that sense DXT will probably be slower in some cases simply due to the fact it has to do slightly more work to decode/decompress the data before rendering it.

I doubt you'd ever notice it and I don't recall reading of or experiencing any performance problems regarding rendering from DXT textures...


Jack

Share this post


Link to post
Share on other sites
If anything DXT textures would work faster, since they require less memory bandwidth. Hardware is overall well-equiped to use them, I'd recommend you do if you can.

Share this post


Link to post
Share on other sites
Quote:
Original post by sirob
If anything DXT textures would work faster, since they require less memory bandwidth.
Yes, that is a good point - really should've thought of that myself [smile]

Quote:
Can you tell me..how much is DXT slower than classical formats?
No, can't really put a value on it. Measuring and understanding performance with high-end 3D graphics is non-trivial and thus generating broad statistics like you're asking is often either impossible or just meaningless.


hth
Jack

Share this post


Link to post
Share on other sites

Shouldnt there be cases when the decompress in GPU gets less efficient like lots of small triangles (having to resync the decompress frequently - especially if thy have UVs that jump around) or UV render orientation different than the texture's scan lines (ie- Y major X minor) ???

I had thought that the DTX1 etc were fully decompressed into GPU memory (maybe that was on older cards..) and now they can do all kinds of tricks in hardware (with an overall speedup). With multiple pixel engines (12 16 more?) internal bandwidth is possibly more significant now.

Share this post


Link to post
Share on other sites

This topic is 4015 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this