Sign in to follow this  
dpmodex

What is the purpose of texture compression?

Recommended Posts

Palidine    1315
compression is always for memory savings at the sacrifice of some speed, assuming you will eventually need to decompress it to use it. the decompression always takes more time than not decompressing. :)

-me

Share this post


Link to post
Share on other sites
Sneftel    1788
Actually, modern graphics cards can do DXT decompression with ~0 overhead. It's a space savings, and it comes more or less for free, not counting the drop in quality.

Share this post


Link to post
Share on other sites
darookie    1441
S3TC is implemented in hardware for years (since NVidia's RivaTNT
card) and will
<code>
a) speed up loading and displaying:
- 512x512x32 textures will be 1mb uncompressed and only
128kb to 256kb (depending on compression method) when
stored as S3TC texture
- displaying is faster as S3TC uses 4x4 pixel blocks so
less data needs to be passed through the bus and pipelines
b) save a lot of texture memory:
- "DXT1" textures only take up 4 bits per pixel, while
"DXT3" and "DXT5" textures (4 bit explicit and interpolated alpha values) will use 8 bits per pixel
</code>
The quality tradeoff differs with the compression algorithm used.
NVidia cards were known to have a bug resulting in very poor rendering quality with S3TC textures.
(I don't know if this issue has been resolved yet)
Due to the 16 bit color quantisation and the block compression nature of the algorithm, you may experience banding artifacts with compressed textures, too.
Generally the output quality is acceptable (sometimes even very good). Since the algorithm is available you can in certain cases
even implement your own compression tool that can produce better
results than Nvidia's or Microsoft's tools (e.g. my tool produces
way better results in many cases than Microsoft's DxTex tool).

[edit]
This thread contains some sample images so you can judge the quality yourself [smile]
[/edit]

Cheers,
Pat

Share this post


Link to post
Share on other sites
zedzeek    529
>> Memory saving or speed?
Or both?<<

both, ie it uses less memory and is normally quicker (the drawback though is the less quality)

Share this post


Link to post
Share on other sites
Yann L    1802
Quote:
Original post by Sneftel
Actually, modern graphics cards can do DXT decompression with ~0 overhead. It's a space savings, and it comes more or less for free, not counting the drop in quality.

Using compressed textures is often faster than using regular ones, due to the more efficient cache usage and the decreased memory bandwidth requirements. This is especially noticeable on large textures (512+).

Share this post


Link to post
Share on other sites
Dredge-Master    175
the speed increase goes for both the hardware based compression, and also in general decompression in files such as in the PNG format (zlib) with lossless compression.
In the case of the later, it's quicker to copy a compressed file and decompressing on the fly, than reading the whole file from the hard drive. This is due to hard drive read speeds.
It's a very similar reason to inside your graphics card, except your video card probably doesn't have a hard drive attached to it. :)

Share this post


Link to post
Share on other sites

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