Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#ActualHodgman

Posted 24 March 2013 - 09:21 PM

There's a lot of libraries that can do the compression for you, e.g.

http://developer.amd.com/resources/archive/archived-tools/gpu-tools-archive/ati_compress/

https://code.google.com/p/nvidia-texture-tools/

https://code.google.com/p/libsquish/

https://code.google.com/p/crunch/

 

Some forum members here have also written their own -- LSpiro's is available as an exe tool, and IIRC, cr88192 posted some code for a fast compressor recently designed for on-load use.

 

However, high quality texture compression is a slow process. e.g. the nvidia library lets you choose between quality or time, but you can't have both. This is the main reason that textures are usually pre-compressed. So if you use fast on-load texture compression, then the quality impact of texture compression will be even worse than usual!

 

If you want fast loading times in both cases, you could store both the DDS and PNG files on disk wink.png

 

DXT5 compression has a 4:1 ratio, so another option would be to always use texture compression, but simply use higher resolutions on better GPUs. e.g use 4096x4096 textures on GPUs with more VRAM, and 2048x2048 textures on other GPUs (this is the same VRAM saving as turning on/off compression). You can do this by simply ignoring the first mip in the DDS file.

 

As a side note, texture compression doesn't just save VRAM, but also saves bandwidth when performing texture fetch instructions in your shaders (which makes your shaders run faster if they're bound by fetch latencies).


#3Hodgman

Posted 24 March 2013 - 09:20 PM

There's a lot of libraries that can do the compression for you, e.g.

http://developer.amd.com/resources/archive/archived-tools/gpu-tools-archive/ati_compress/

https://code.google.com/p/nvidia-texture-tools/

https://code.google.com/p/libsquish/

https://code.google.com/p/crunch/

 

Some forum members here have also written their own -- LSpiro's is available as an exe tool, and IIRC, cr88192 posted some code for a fast compressor recently designed for on-load use.

 

However, high quality texture compression is a slow process. e.g. the nvidia library lets you choose between quality or time, but you can't have both. This is the main reason that textures are usually pre-compressed. So if you use fast on-load texture compression, then the quality impact of texture compression will be even worse than usual!

 

If you want fast loading times in both cases, you could store both the DDS and PNG files on disk wink.png

 

DXT5 compression has a 4:1 ratio, so another option would be to always use texture compression, but use 4096x4096 textures on GPUs with more VRAM, and 2048x2048 textures on other GPUs (this is the same VRAM saving as turning on/off compression). You can do this by simply ignoring the first mip in the DDS file.

 

As a side note, texture compression doesn't just save VRAM, but also saves bandwidth when performing texture fetch instructions in your shaders (which makes your shaders run faster if they're bound by fetch latencies).


#2Hodgman

Posted 24 March 2013 - 09:18 PM

There's a lot of libraries that can do the compression for you, e.g.

http://developer.amd.com/resources/archive/archived-tools/gpu-tools-archive/ati_compress/

https://code.google.com/p/nvidia-texture-tools/

https://code.google.com/p/libsquish/

https://code.google.com/p/crunch/

 

Some forum members here have also written their own -- LSpiro's is available as an exe tool, and IIRC, cr88192 posted some code for a fast compressor recently designed for on-load use.

 

However, high quality texture compression is a slow process. e.g. the nvidia library lets you choose between quality or time, but you can't have both. This is the main reason that textures are usually pre-compressed. So if you use fast on-load texture compression, then the quality impact of texture compression will be even worse than usual!

 

If you want fast loading times in both cases, you could store both the DDS and PNG files on disk wink.png

 

DXT5 compression has a 4:1 ratio, so another option would be to always use texture compression, but use 4096x4096 textures on GPUs with more VRAM, and 2048x2048 textures on other GPUs (this is the same VRAM saving as turning on/off compression). You can do this by simply ignoring the first mip in the DDS file.

 

As a side note, texture compression doesn't just save VRAM, but also saves bandwidth when performing texture fetch instructions in your shaders (which makes your shaders run faster if they're bound by fetch latencies).


#1Hodgman

Posted 24 March 2013 - 09:17 PM

There's a lot of libraries that can do the compression for you, e.g.

http://developer.amd.com/resources/archive/archived-tools/gpu-tools-archive/ati_compress/

https://code.google.com/p/nvidia-texture-tools/

https://code.google.com/p/libsquish/

https://code.google.com/p/crunch/

 

However, high quality texture compression is a slow process. e.g. the nvidia library lets you choose between quality or time, but you can't have both. This is the main reason that textures are usually pre-compressed. So if you use fast on-load texture compression, then the quality impact of texture compression will be even worse than usual!

 

If you want fast loading times in both cases, you could store both the DDS and PNG files on disk wink.png

 

DXT5 compression has a 4:1 ratio, so another option would be to always use texture compression, but use 4096x4096 textures on GPUs with more VRAM, and 2048x2048 textures on other GPUs (this is the same VRAM saving as turning on/off compression). You can do this by simply ignoring the first mip in the DDS file.

 

As a side note, texture compression doesn't just save VRAM, but also saves bandwidth when performing texture fetch instructions in your shaders (which makes your shaders run faster if they're bound by fetch latencies).


PARTNERS