neoragex2015 / nvidia-texture-tools

Automatically exported from code.google.com/p/nvidia-texture-tools
Other
0 stars 0 forks source link

Add support for Wii DDS ( customized DDS ( DXT1 / DXT1A ) ) #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add support for wii variation DDS ( byte swapped DDS ( DXT1 / DXT1A ) )

The DDS used by the wii is basically the standard DXT1 and DXT1A format but 
has a few things byte swapped or swizzled.

You need to pack a 2x2 set of the 64 bit blocks into 32 byte tiles instead 
of linearly.
The first 8 bytes of the header need to be byte swapped.
Each 2-bit index need to be bit swapped.
Pad 2x2 tiles with 0's to multiples of 32 byte blocks

Original issue reported on code.google.com by andi.ire...@gmail.com on 27 Oct 2008 at 4:03

GoogleCodeExporter commented 9 years ago
Is this publicly documented anywhere?

Original comment by cast...@gmail.com on 27 Oct 2008 at 8:22

GoogleCodeExporter commented 9 years ago
I believe it must be since there are other tools that support it based on the 
list in 
the wii docs.

it is literally DXT1 and DXT1a but the two colosr in the texel block are byte 
swapped 
and the tuples (2bit) in the lookup table is bit swapped.

then the 64bit blocks are clustered in a 2x2 pattern.

its not really unusual or complex it is just aligning the DXTn blocks to a 
specific 
platforms texture cache line size which in this case is 32byte.

to prevent any issues maybe if you make it generic by allowing accessors to set 
certain parts of the process to be byte swapped optionally, and allow a block 
pattern 
in be specified as N columns and N rows per "tile".

Original comment by andi.ire...@gmail.com on 28 Oct 2008 at 1:10

GoogleCodeExporter commented 9 years ago
I'm not planning to add platform specific file formats, specially when the 
details 
have not been disclosed publicly and are possibly under NDA.

It seems to me that what you describe should be easy to accomplish as a 
post-process. 

Original comment by cast...@gmail.com on 28 Oct 2008 at 1:44