The transparency block and the color block are arranged as shown in the following table.透明度块和颜色块中数据的排列如下表所示。
Word address | 64-bit block |
---|---|
3:0 | Transparency block |
7:4 | Previously described 64-bit block |
字地址 | 64位块 |
3:0 | 透明度块 |
7:4 | 前述64位块 |
Explicit Texture Encoding 直接纹理编码
For explicit texture encoding (DXT2 and DXT3 formats), the alpha components of the texels that describe transparency are encoded in a 4x4 bitmap with 4 bits per texel. 对于直接纹理编码(DXT2和DXT3格式),描述texel的透明度的阿尔法分量被编码在一个4x4位图中,每个texel占用4位。These four bits can be achieved through a variety of means such as dithering or by using the four most significant bits of the alpha data. 这四位阿尔法值可以通过各种方法得到,诸如抖动或使用阿尔法数据的最高四位。However they are produced, they are used just as they are, without any form of interpolation.但无论它们是如何产生的,都只按原样使用,不做任何形式的插值。
The following diagram shows a 64-bit transparency block.下图显示了一个64位的透明度块。
The compression method of Direct3D uses the four most significant bits. Microsoft® Direct3D®的压缩方法使用最高四位。
The following tables illustrate how the alpha information is laid out in memory, for each 16-bit word.
下面这些表描述了在每个16位字中,阿尔法信息的内存布局。
This table contains the layout for word 0.
Bits | Alpha |
---|---|
3:0 (LSB*) | [0][0] |
7:4 | [0][1] |
11:8 | [0][2] |
15:12 (MSB*) | [0][3] |
*least-significant bit, most significant bit (MSB)
This table contains the layout for word 1.
Bits | Alpha |
---|---|
3:0 (LSB) | [1][0] |
7:4 | [1][1] |
11:8 | [1][2] |
15:12 (MSB) | [1][3] |
This table contains the layout for word 2.
Bits | Alpha |
---|---|
3:0 (LSB) | [2][0] |
7:4 | [2][1] |
11:8 | [2][2] |
15:12 (MSB) | [2][3] |
This table contains the layout for word 3.
Bits | Alpha |
---|---|
3:0 (LSB) | [3][0] |
7:4 | [3][1] |
11:8 | [3][2] |
15:12 (MSB) | [3][3] |
The color compare used in DXT1 to determine if the texel is transparent is not used in this format. 为了检测texel 是否是透明的,在DXT1中要对颜色进行比较. It is assumed that without the color compare the color data is always treated as if in 4-color mode. 我们认为在不需要颜色比较的情况下,颜色数据总是以四色模式进行处理。