Difference between revisions of "DXT"

From polycount
Jump to: navigation, search
(new page)
 
(removed redundant link)
Line 51: Line 51:
 
* [http://msdn.microsoft.com/en-us/library/bb204842%28v=VS.85%29.aspx Compressed Texture Formats (Direct3D 9)] - Microsoft documentation.
 
* [http://msdn.microsoft.com/en-us/library/bb204842%28v=VS.85%29.aspx Compressed Texture Formats (Direct3D 9)] - Microsoft documentation.
 
* [http://en.wikipedia.org/wiki/S3TC S3 Texture Compression] - Wikipedia page.
 
* [http://en.wikipedia.org/wiki/S3TC S3 Texture Compression] - Wikipedia page.
* [http://udn.epicgames.com/Two/TextureComparison.html DXTC: DXTC Examples and Technical Comparison] - visual examples from the Unreal Development Kit. Note: "Bright" = 256-color paletted, "DXTC" = [[DXT|DXT3/DXT5]].
+
* [http://udn.epicgames.com/Two/TextureComparison.html DXTC: DXTC Examples and Technical Comparison] - visual examples from the Unreal Development Kit. Note: "Bright" = 256-color paletted, "DXTC" = DXT3/DXT5.
  
 
----
 
----
 
[[Category:TextureFormatRuntime]]
 
[[Category:TextureFormatRuntime]]

Revision as of 11:19, 3 August 2010

DXT

DXT is a texture compression format, formerly known as S3TC.

The format can be stored inside many container formats like DDS, VTF, etc. DXT is widely supported on current graphics hardware, meaning it will stay compressed in video memory, allowing the artist to use more or larger textures.

Source images must be power of two in size (i.e. 4x4, 32x8, 256x512, 1024x1024, etc.), and the smallest size is 4x4 (smaller images will be padded out to this size).

There are five DXT formats: DXT1, DXT2, DXT3, DXT4, and DXT5.


DXT1a

Generally the best DXT format for textures with just black and white in the Alpha channel, no grays.

  • Compressed, with 1-bit Alpha (just black and white, no grays).
  • Smallest file size, half the size of DXT3 and DXT5. Same file size as DXT1c.
  • Doesn't work very well on images that have stark color changes, like pixel art.
  • DXT1a and DXT1c are the same format, just an internal switch for enabling alpha or not.

DXT1c

Generally the best DXT format for textures without an Alpha channel.

  • Compressed, with no Alpha.
  • Smallest file size, half the size of DXT3 and DXT5. Same file size as DXT1a.
  • Doesn't work very well on images that have stark color changes, like pixel art.
  • DXT1a and DXT1c are the same format, just an internal switch for enabling alpha or not.

DXT2

  • Same format as DXT3, except it assumes the alpha is not pre-multiplied.
  • Rarely used because it requires extra processing in the shader.

DXT3

Generally the best DXT format for textures with a sharp Alpha channel.

  • Compressed, with "explicit" Alpha.
    1. Color is compressed the same as DXT1.
    2. In the alpha channel, each pixel is only one of 16 levels of gray.
    3. This works well if the alpha values are mostly black and mostly white, with thin anti-aliasing between them.
  • Twice the file size of DXT1, same file size as DXT5.

DXT4

  • Same format as DXT5, except it assumes the alpha is not pre-multiplied.
  • Rarely used because it requires extra processing in the shader.

DXT5

Generally the best DXT format for textures with a smooth Alpha channel.

  • Compressed, with interpolated Alpha.
    • Color is compressed the same as DXT1.
    • In the alpha channel, each 4x4 block is compressed separately from the others. Two of the pixels are stored in 256 levels of gray, while the other 14 pixels in the block are interpolated between those two, using 8 levels of gray.
    • This works well when each block has a fairly smooth gradation of values, rather than sharp transitions.
  • Twice the file size of DXT1, same file size as DXT3.

Links


Personal tools
Namespaces

Variants
Actions
Navigation
Tools