Difference between revisions of "DXT"

From polycount
Jump to: navigation, search
(new page)
 
m
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= DXT =
+
DXT is a texture compression format, formerly known as S3TC. 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.  
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.  
+
There are five DXT formats: DXT1, DXT2, DXT3, DXT4, and DXT5.  
  
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).
+
In DirectX 10 it is known as [http://msdn.microsoft.com/en-us/library/bb694531%28VS.85%29.aspx Block Compression] and comes in five basic flavors: BC1, BC2, BC3, BC4, and BC5.
 
+
There are five DXT formats: DXT1, DXT2, DXT3, DXT4, and DXT5.
+
  
 +
The DXT compression format can be stored inside many container files like [[DDS]], [[VTF]], etc. but DDS is the most common file extension.
  
 +
Source images must be power of two in size (i.e. 4x4, 32x8, 256x512, 1024x1024, etc.), and the smallest size is 4x4. If you feed it a smaller size (like 1x1 or 1x256) the file will be padded out to 4 pixels wide and/or tall.
  
 
== DXT1a ==
 
== DXT1a ==
 
Generally the best DXT format for textures with just black and white in the Alpha channel, no grays.
 
Generally the best DXT format for textures with just black and white in the Alpha channel, no grays.
 +
* In DirectX 10 it is called BC1.
 
* Compressed, with 1-bit Alpha (just black and white, 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.
 
* 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.
 
* 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.
 
* DXT1a and DXT1c are the same format, just an internal switch for enabling alpha or not.
 +
* Note: the alpha is actually stored in the RGB data, so the black parts of the Alpha will replace the RGB color completely.
  
 
== DXT1c ==
 
== DXT1c ==
 
Generally the best DXT format for textures without an Alpha channel.
 
Generally the best DXT format for textures without an Alpha channel.
 +
* In DirectX 10 it is called BC1.
 
* Compressed, with no Alpha.
 
* Compressed, with no Alpha.
 
* Smallest file size, half the size of DXT3 and DXT5. Same file size as DXT1a.
 
* Smallest file size, half the size of DXT3 and DXT5. Same file size as DXT1a.
Line 25: Line 27:
  
 
== DXT2 ==
 
== DXT2 ==
 +
* In DirectX 10 it is called BC2.
 
* Same format as DXT3, except it assumes the alpha is not pre-multiplied.
 
* Same format as DXT3, except it assumes the alpha is not pre-multiplied.
 
* Rarely used because it requires extra processing in the shader.
 
* Rarely used because it requires extra processing in the shader.
Line 30: Line 33:
 
== DXT3 ==
 
== DXT3 ==
 
Generally the best DXT format for textures with a sharp Alpha channel.
 
Generally the best DXT format for textures with a sharp Alpha channel.
 +
* In DirectX 10 it is called BC2.
 
* Compressed, with "explicit" Alpha.
 
* Compressed, with "explicit" Alpha.
 
*# Color is compressed the same as DXT1.
 
*# Color is compressed the same as DXT1.
Line 37: Line 41:
  
 
== DXT4 ==
 
== DXT4 ==
 +
* In DirectX 10 it is called BC3.
 
* Same format as DXT5, except it assumes the alpha is not pre-multiplied.
 
* Same format as DXT5, except it assumes the alpha is not pre-multiplied.
 
* Rarely used because it requires extra processing in the shader.
 
* Rarely used because it requires extra processing in the shader.
Line 42: Line 47:
 
== DXT5 ==
 
== DXT5 ==
 
Generally the best DXT format for textures with a smooth Alpha channel.
 
Generally the best DXT format for textures with a smooth Alpha channel.
 +
* In DirectX 10 it is called BC3.
 
* Compressed, with interpolated Alpha.
 
* Compressed, with interpolated Alpha.
 
** Color is compressed the same as DXT1.
 
** Color is compressed the same as DXT1.
Line 51: Line 57:
 
* [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]]

Latest revision as of 08:27, 10 January 2019

DXT is a texture compression format, formerly known as S3TC. 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.

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

In DirectX 10 it is known as Block Compression and comes in five basic flavors: BC1, BC2, BC3, BC4, and BC5.

The DXT compression format can be stored inside many container files like DDS, VTF, etc. but DDS is the most common file extension.

Source images must be power of two in size (i.e. 4x4, 32x8, 256x512, 1024x1024, etc.), and the smallest size is 4x4. If you feed it a smaller size (like 1x1 or 1x256) the file will be padded out to 4 pixels wide and/or tall.

DXT1a

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

  • In DirectX 10 it is called BC1.
  • 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.
  • Note: the alpha is actually stored in the RGB data, so the black parts of the Alpha will replace the RGB color completely.

DXT1c

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

  • In DirectX 10 it is called BC1.
  • 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

  • In DirectX 10 it is called BC2.
  • 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.

  • In DirectX 10 it is called BC2.
  • 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

  • In DirectX 10 it is called BC3.
  • 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.

  • In DirectX 10 it is called BC3.
  • 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