pioneerspacesim/pioneer — pull request #1522 by fluffyfreak (2012-09-18 12:06:58+00:00)
Title: Add support for compressed textures.

#Description:
Textures compressed using DXT1 or DXT5 take up less memory and are supported in hardware across almost all (*any knwon exceptions?*) graphics hardware. With the support of the GL_ARB_texture_compression standard graphics drivers are able to take an uncompressed texture and compress it in (*near*) realtime.

This patch adds support to for this realtime texture compression hopefully reducing the games video memory footprint and drastically reducing the bandwidth required for texturing during rendering.

#Downsides:
In no particular order;
* Loading time might be extended,
* Not all drivers are equal in their compression performance.
* Rendering performance might be impacted,
* We texture our terrains in realtime and there might be negative performance from this though I haven't measured any yet,
* Lack of support on some platforms or drivers,
* Decrease in some texture quality,
* DXTn formats are lossy and can caused "blocky" artefacts,
* Potential rendering bugs caused by partial support of drivers,
* Lack of control over which images/textures the effect is applied to,
* It would be good avoid compressing GUI or other 2D textures but currently there is no support for this.

NB: I really am stretching to find all of these I don't think that they're as bad as I'm making them sound.

# Results:
I've noticed no major rendering issues aside from the obvious decrease in the quality of textures across (laptop) ATi/AMD and (desktop) nVidia GPUs on Windows 7 64bit machines. These are however the only machines I have to test with currently.

Performance is hard to measure as is the actual decrease in memory consumption due to none standard GPU memory querying methods. Again unfortunately both of my platforms have more than enough memory for anything that Pioneer currently throws at them.

Cheers,

Andy