1Name 2 3 3DFX_texture_compression_FXT1 4 5Name Strings 6 7 GL_3DFX_texture_compression_FXT1 8 9Contact 10 11 Don Mullis, 3dfx Interactive (dwm 'at' 3dfx.com) 12 13Status 14 15 CANDIDATE FOR FINAL DRAFT -- NOT YET COMPLETE 16 17Version 18 19 Draft 0.4, 12 Apr 2000 20 21Number 22 23 206 24 25Dependencies 26 27 OpenGL 1.1 is required. 28 GL_ARB_texture_compression is required. 29 This extension is written against the OpenGL 1.2.1 Specification. 30 31Overview 32 33 This extension additional texture compression functionality 's FXT1 34 format, specific to 3dfxsubject to all the requirements and 35 limitations described by the extension GL_ARB_texture_compression. 36 The FXT1 texture format supports only 2D and 3D images without 37 borders. 38 39 Because 3dfx expects to make continual improvement to its FXT1 40 compressor implementation, 3dfx recommends that to achieve best 41 visual quality applications adopt the following procedure with 42 respect to reuse of textures compressed by the GL: 43 44 1) Save the RENDERER and VERSION strings along with images 45 compressed by the GL; 46 2) Before reuse of the textures, compare the stored strings with 47 strings newly returned from the current GL; 48 3) If out-of-date, repeat the compression and storage steps. 49 50IP Status 51 52 A royalty-free license is available from 3dfx Interactive 53 (http://www.3dfx.com/). 54 55Issues 56 57 (1) Two or only one internalformat tokens: 58 GL_COMPRESSED_RGBA_FXT1_3DFX and GL_COMPRESSED_RGB_FXT1_3DFX, or 59 GL_COMPRESSED_RGBA_FXT1_3DFX only. These names are placeholders, 60 the point in question is whether there should be separate tokens 61 reflecting extrinsic knowledge of whether the image contains any 62 non-unity alpha values. This arises because the FXT1 image 63 format distinguishes non-unity alpha only at the level of an 64 individual 8x4 compression block. If there are two distinct 65 tokens, passing GL_COMPRESSED_RGB_FXT1_3DFX to 66 CompressedTexImage with an image that contained non-unity-alpha 67 blocks would be an error. 68 69 RESOLVED. Two distinct tokens specified. This is largely to 70 follow the usual usage by apps of non-compressed tokens. 71 72 (2) Support for borders. 73 74 RESOLVED. Not supported. 75 76 (3) Support for TexSubImage at a level more general than that 77 guaranteed by ARB_texture_compression. 78 79 RESOLVED. Not supported; See issue (5) of the 80 GL_ARB_texture_compression spec. 81 82New Procedures and Functions 83 84 None 85 86New Tokens 87 88 Accepted by the <internalformat> parameter of TexImage2D, 89 CopyTexImage2D, TexImage3D, CopyTexImage3D, and by the 90 <internalformat> and <format> parameters of 91 CompressedTexImage2D_ARB, CompressedTexSubImage2D_ARB, 92 CompressedTexImage3D_ARB, CompressedTexSubImage3D_ARB: 93 94 COMPRESSED_RGB_FXT1_3DFX 0x86B0 95 COMPRESSED_RGBA_FXT1_3DFX 0x86B1 96 97Additions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation) 98 99 None. 100 101Additions to Chapter 3 of the OpenGL 1.2.1 Specification (Rasterization) 102 103 Add Table 3.16.1: Specific Compressed Internal Formats 104 105 Compressed Internal Format Base Internal Format 106 ========================== ==================== 107 COMPRESSED_RGB_FXT1_3DFX RGB 108 COMPRESSED_RGBA_FXT1_3DFX RGBA 109 110 Add to Section 3.8.2, Alternate Image Specification (adding to the 111 end of the CompressedTexImage section introduced by the 112 ARB_texture_compression spec) 113 114 If <internalformat> is COMPRESSED_RGB_FXT1_3DFX, 115 COMPRESSED_RGBA_FXT1_3DFX, the compressed texture is stored using 116 one of several FXT1 compressed texture image formats. FXT1 texture 117 compression supports only 2D images without borders. 118 CompressedTexImage1DARB and CompressedTexImage3DARB produce an 119 INVALID_ENUM error if <internalformat> is an FXT1 format. 120 CompressedTexImage2DARB will produce an INVALID_OPERATION error if 121 <border> is non-zero. 122 123 124 Add to Section 3.8.2, Alternate Image Specification (adding to the 125 end of the CompressedTexSubImage section introduced by the 126 ARB_texture_compression spec) 127 128 If the internal format of the texture image being modified is 129 COMPRESSED_RGB_FXT1_3DFX, COMPRESSED_RGBA_FXT1_3DFX, the texture is 130 stored using one of the several FXT1 compressed texture image 131 formats. Since the FXT1 texture compression algorithm supports only 132 2D images, CompressedTexSubImage1DARB and CompressedTexSubImage3DARB 133 produce an INVALID_ENUM error if <format> is an FXT1 format. 134 135Additions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment 136Operations and the Frame Buffer) 137 138 None. 139 140Additions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions) 141 142 None. 143 144Additions to Chapter 6 of the OpenGL 1.2.1 Specification (State and 145State Requests) 146 147 None. 148 149Additions to Appendix A of the OpenGL 1.2.1 Specification (Invariance) 150 151 None. 152 153Additions to the AGL/GLX/WGL Specifications 154 155 None. 156 157GLX Protocol 158 159 None. 160 161Errors 162 163 INVALID_ENUM is generated by CompressedTexImage1DARB if 164 <internalformat> is GL_COMPRESSED_RGB_FXT1_3DFX or 165 GL_COMPRESSED_RGBA_FXT1_3DFX. 166 167 INVALID_OPERATION is generated by CompressedTexImage2DARB or 168 CompressedTexImage3DARB if <internalformat> is 169 GL_COMPRESSED_RGB_FXT1_3DFX or GL_COMPRESSED_RGBA_FXT1_3DFX and 170 <border> is not equal to zero. 171 172 INVALID_ENUM is generated by CompressedTexSubImage1DARB if <format> 173 is GL_COMPRESSED_RGB_FXT1_3DFX or GL_COMPRESSED_RGBA_FXT1_3DFX. 174 175Appendix 176 177 FXT1 comprises four different compressed texture formats. Each of 178 the formats compress an 8x4 texel blocks into 128 bits. During the 179 compression phase, the encoder selects one of the four formats for 180 each block based on which encoding scheme results in best overall 181 visual quality. Unused pixel locations along the right or bottom 182 edges within a block should contain a repetition of the values in 183 used locations. The total size of an image is ceil(width/8) * 184 ceil(height/4) * 16 bytes. 185 186 In each compression format, the 32 texels of the 8x4 block are 187 partitioned into two 4x4 sub-blocks according to the following 188 diagram: 189 190 t0 t1 t2 t3 t16 t17 t18 t19 191 t4 t5 t6 t7 t20 t21 t22 t23 192 t8 t9 t10 t11 t24 t25 t26 t27 193 t12 t13 t14 t15 t28 t29 t30 t31 194 195 In the following bit-level descriptions, bits of increasing index 196 are stored in bytes at likewise increasing offsets, i.e. the order 197 is "little-endian". 198 199 200 1. FXT1 Compressed Texture Format CC_HI: 201 202 (rgb555) (3-bit/texel) 203 mode[1:0] color1 color0 texel 31 to 16 texel 15 to 0 204 2 15 15 48 48 205 206 207 [127:126] mode[1:0] 208 [125:121] red of color1 209 [120:116] green of color1 210 [115:111] blue of color1 211 [110:106] red of color0 212 [105:101] green of color0 213 [100:96] blue of color0 214 [95:93] texel 31 215 ... 216 [50:48] texel 16 217 [47:45] texel 15 218 ... 219 [2:0] texel 0 220 221 In CC_HI format, mode = 00b, the 15-bit color1 (RGB555 format) and 222 color0 (RGB555 format) colors are converted into 24-bit RGB888 223 colors by duplicating the upper 3 bits for the 3 LSBs. The 24-bit 224 converted color1 and color0 are then used to linearly interpolate 5 225 more levels of color to create seven total levels of colors and 1 226 alpha (transparent) color. The first seven colors always have 227 alpha=ffh (opaque), while the eighth color is defined to be 228 transparent black (r,g,b=00h, alpha=00h). 229 230 These eight 32-bit colors are used as the contents of an 8-entry (3 231 bit index) lookup table. For all 32 texels in the block, each 232 texel's 3-bit index value is used to index the lookup table, the 233 output from the lookup table representing the 32-bit color 234 (ARGB8888) for that texel. 235 236 Generating RGB888 from RGB555: 237 238 Color1 (red) = {[125:121], [125:123]} 239 Color1 (green) = {[120:116], [120:118]} 240 Color1 (blue) = {[115:111], [115:113]} 241 242 Color0 (red) = {[110:106], [110:108]} 243 Color0 (green) = {[105:101], [105:103]} 244 Color0 (blue) = {[100:96], [100:98]} 245 246 Creating seven ARGB8888 colors from two RGB888 colors (operations 247 performed individually for each color channel): 248 249 Color[0] = color0[r,g,b], alpha[0] = ffh 250 Color[1] = (5*color0[r,g,b] + color1[r,g,b] +3 )/6 alpha[1] = ffh 251 Color[2] = (4*color0[r,g,b] + 2*color1[r,g,b] +3 )/6 alpha[2] = ffh 252 Color[3] = (3*color0[r,g,b] + 3*color1[r,g,b] +3 )/6 alpha[3] = ffh 253 Color[4] = (2*color0[r,g,b] + 4*color1[r,g,b] +3 )/6 alpha[4] = ffh 254 Color[5] = (color0[r,g,b] + 5*color1[r,g,b] +3 )/6 alpha[5] = ffh 255 Color[6] = color1[r,g,b], alpha[6] = ffh 256 Color[7] = where r,g,b = 00h, alpha[7]=00h 257 258 Table Lookup: 259 3-bit index of Color for texel 31 to texel 0 260 texel31 to texel0 (ARGB8888) 261 262 0 color[0] => {a[7:0], r[7:0], g[7:0], b[7:0]} 263 1 color[1] 264 2 color[2] 265 3 color[3] 266 4 color[4] 267 5 color[5] 268 6 color[6] 269 7 color[7] 270 271 272 2. FXT1 Compressed Texture Format CC_CHROMA: 273 274 (rgb555) (2-bit/texel) 275 Mode[2:0] unused color3 color2 color1 color0 texel 31 to 16 texel 15 to 0 276 3 1 15 15 15 15 32 32 277 278 [127:125] mode[2:0] 279 [124] unused 280 [123:119] color3(r5) 281 [118:114] color3(g5) 282 [113:109] color3(b5) 283 [108:104] color2(r5) 284 [103:99] color2(g5) 285 [98:94] color2(b5) 286 [93:89] color1(r5) 287 [88:84] color1(g5) 288 [83:79] color1(b5) 289 [78:74] color0(r5) 290 [73:69] color0(g5) 291 [68:64] color0(b5) 292 [63:62] texel 31 293 ... 294 [33:32] texel 16 295 [31:30] texel 15 296 ... 297 [1:0] texel 0 298 299 In CC_CHROMA format, mode=010b, the 15-bit colors color[3:0] 300 (RGB555) are converted into 24-bit RGB888 colors exactly the same as 301 in the CC_HI format via bit replication. Color3 to Color0 are used 302 as they are (after conversion to RGB888 format), but without 303 interpolation. The 24-bit converted colors color3, color2, color1, 304 and color0 are used as the contents of a 4-entry (2-bit index) 305 lookup table. The Alpha channel of the output of the lookup table is 306 always opaque(ffh), regardless of the 2-bit index value. The 32-bit 307 (ARGB8888) color value for each texel is obtained by performing 308 table lookup using that texel's 2-bit index. 309 310 Table Lookup: 311 312 2-bit index of Color for texel 31 to texel 0 313 texel 31 to texel 0 (ARGB8888) 314 315 0 color0, alpha = ffh 316 1 color1, alpha = ffh 317 2 color2, alpha = ffh 318 3 color3, alpha = ffh 319 320 321 3. FXT1 Compressed Texture Format CC_MIXED: 322 323 (rgb555) (2-bit/texel) 324 mode[0] glsb[1:0] alpha[0] color3 color2 color1 color0 texel 31to16 texel 15to0 325 1 2 1 15 15 15 15 32 32 326 327 328 [127] mode[0] 329 [126:125] glsb[1:0] (lsbs of green for color 1 & color 3) 330 [124] alpha[0] 331 [123:119] color3(r5) 332 [118:114] color3(g5) 333 [113:109] color3(b5) 334 [108:104] color2(r5) 335 [103:99] color2(g5) 336 [98:94] color2(b5) 337 [93:89] color1(r5) 338 [88:84] color1(g5) 339 [83:79] color1(b5) 340 [78:74] color0(r5) 341 [73:69] color0(g5) 342 [68:64] color0(b5) 343 [63:62] texel 31 344 ... 345 [33:32] texel 16 346 [31:30] texel 15 347 ... 348 [1:0] texel 0 349 350 In CC_MIXED format, mode[0]=1 (only one bit), color2 and color3 are 351 used for texels 31 to 16, and color0 and color1 are used for texels 352 15 to 0. When alpha[0] = 0, the two pairs of colors (colors 0 and 1 353 for texels 15 to 0 and colors 2 and 3 for texels 31 to 16) are 354 interpreted as 16-bit RGB565 colors. For color1 and color3, the LSB 355 (bit 0) of the green channel comes from the glsb bits 356 (color1.green[0] = bit 125, color3.green[0] = bit 126). For color0 357 and color2, the LSB (bit 0) of the green channel comes from the 358 upper select bit for texel 0 and texel 16, respectively 359 (color0.green[0] = bit 1 xor bit 125, color2.green[0] = bit 33 xor 360 bit 126). The two 16-bit colors are then expanded to a 24-bit RGB888 361 format by bit replication (most significant bits replicated in the 362 least significant bits), and are then used to create 2 more levels 363 of color in between the color0/2 and color1/3 values through linear 364 interpolation. A total of 4 colors are therefore available for 2-bit 365 index per texel selection. 366 367 When alpha[0]=1, color0 and color2 are interpreted as 15-bit RGB555 368 colors, and color 1 and color3 are interpreted as RGB565 colors. For 369 color0 and color2, the 15-bit RGB555 colors are expanded to 24-bit 370 RGB888 colors by bit replication. For color1 and color3, the LSB 371 (bit 0) of the green channel comes from the glsb bits 372 (color1.green[0] = bit 125, color3.green[0] = bit 126), and then bit 373 replication is used to convert from the 16-bit RGB565 format to a 374 24-bit RGB888 format. A third color is created by linear 375 interpolation (interpolating between the converted 24-bit RGB888 376 color0 and color1 for texels 15 to 0, and interpolating between the 377 converted 24-bit RGB888 color2 and color3 for texels 31 to 16). 378 Finally, a fourth color (texel index 0x3) is defined to be 379 transparent black (r,g,b=00h, alpha=00h). A total of 4 colors are 380 therefore available for 2-bit index per texel selection. The 32-bit 381 (ARGB8888) color value for all texels is obtained by performing 382 table lookup using each texel's 2-bit index. 383 384 Creating the 24-bit (RGB888) base colors color3 and color2: 385 386 Color3(red) = {[123:119], [123:121]} 387 Color3(green) = {[118:114], [126], [118:117]} 388 Color3(blue) = {[113:109], [113:111]} 389 Color2(red) = {[108:104], [108:106]} 390 Color2(green) = (alpha[0]=1) ? {[103:99],[103:101]} 391 : {[103:99],[33]^[126],[103:102]} 392 Color2(blue) = {[98:94], [98:96]} 393 394 Creating the 24-bit (RGB888) base colors color1 and color0: 395 396 Color1(red) = {[93:89], [93:91]} 397 Color1(green) = {[88:84], [125], [88:87]} 398 Color1(blue) = {[83:79], [83:81]} 399 Color0(red) = {[78:74], [78:76]} 400 Color0(green) = (alpha[0]=1) ? {[73:69, [73:71]} 401 : {[73:69], [1]^[125], [73:72]} 402 Color0(blue) = {[68:64], [68:66]} 403 404 When alpha[0]=0, because one of the texel select bits is used to 405 determine a bit of color0 and color2, the software encoder must 406 perform some very tricky operations. The method below describes how 407 to generate color0 and color1 and the associated select bits (the 408 same method applies to determining the lsb of green for color2 and 409 color3): 410 411 1. Determine the 16-bit RGB565 color values for color0 & color1. 412 413 2. Determine the select bits for each pixel in the 4x4 sub-block. 414 415 3. If (pixel[0].select[1] != color0.green[0]^color1.green[0]) then 416 swap color0 &color1, and invert all the select bits. 417 418 Below is a snippet of psuedo-C code to generate bits 0-31, bits 419 64-93 & bit 125 based on the initial color0, color1 and pixel 420 indices: 421 422 struct RGB565 {Byte red; Byte green; Byte blue}; 423 424 struct CSels {Byte index[16]}; 425 426 // cc_mixed_right_half derives bits[93:64] of the 128 bit data word of a 427 // CC_MIXED non-alpha compression block and returns them in 'bits_64_to_31'. 428 // Plus, as a bonus, you will receive bit 125, containing the lsb of 429 // the green channel of color1, and bits_0_to_31, containing all of the pixel indices. 430 void 431 cc_mixed_right_half( RGB565 color0, RGB565 color1, 432 CSels pix, 433 Dword &bits_0_to_31, 434 Dword &bits_64_to_93, 435 Bit &bit125) 436 { 437 RGB565 o_color0; 438 RGB565 o_color1; 439 440 // Determine if we need to switch color0 & color1 441 if (((pix.index[0] >> 1) & 1) != ((color0.green ^ color1.green) & 1)) { 442 o_color1 = color0; 443 o_color0 = color1; 444 445 for (int i=0; i<16; i++) 446 pix.index[i] = ~pix.index[i] & 3; 447 } else { 448 o_color0 = color0; 449 o_color1 = color1; 450 } 451 452 // Save lsb of color1.green in bit125 453 bit125 = o_color1.green & 1; 454 455 // Convert color0 & color1 to RGB555, and then munge into bits 64 to 93 456 o_color0.green >>= 1; 457 o_color1.green >>= 1; 458 459 bits_64_to_93 = ( (o_color1.red<<25) | (o_color1.green<<20) | (o_color1.blue<<15) 460 | (o_color0.red<<10) | (o_color0.green<<5) | (o_color0.blue) ); 461 462 // Munge the pixel indices into bits 0 to 31 463 bits_0_to_31 = 0; 464 465 for (int i=0; i<16; i++) 466 bits_0_to_31 |= pix.index[i]<<(i*2); 467 } 468 469 470 Generating the 4-entry lookup table for texels 31 to 16: 471 472 If alpha[0]=0, 473 Color[0] = color2[r,g,b] , alpha=ffh 474 Color[1] = (2 * color2[r,g,b] + color3[r,g,b] + 1) / 3, alpha=ffh 475 Color[2] = (color2[r,g,b] + 2 * color3[r,g,b] +1) / 3, alpha=ffh 476 Color[3] = color3[r,g,b], alpha=ffh 477 478 If alpha[0]=1, 479 Color[0] = color2[r,g,b], alpha=ffh 480 Color[1] = (color2[r,g,b] + color3[r,g,b]) / 2, alpha=ffh 481 Color[2] = color3[r,g,b], alpha=ffh 482 Color[3] = [a,r,g,b] = 00h 483 484 Generating the 4-entry lookup table for texels 15 to 0: 485 486 If alpha[0]=0, 487 Color[0] = color0[r,g,b] , alpha=ffh 488 Color[1] = (2 * color0[r,g,b] + color1[r,g,b] + 1) / 3, alpha=ffh 489 Color[2] = (color0[r,g,b] + 2 * color1[r,g,b] + 1) / 3, alpha=ffh 490 Color[3] = color1[r,g,b], alpha=ffh 491 492 If alpha[0]=1, 493 Color[0] = color0[r,g,b], alpha=ffh 494 Color[1] = (color0[r,g,b] + color1[r,g,b]) / 2, alpha=ffh 495 Color[2] = color1[r,g,b], alpha=ffh 496 Color[3] = [a,r,g,b] = 00h 497 498 Table Lookup: 499 2-bit index of Color for texel 31 to texel 0 500 texel 31 to texel 0 ARGB8888 501 502 0 color[0], {a[7:0], r[7:0], g[7:0], b[7:0]} 503 1 color[1] 504 2 color[2] 505 3 color[3] 506 507 508 4. FXT1 Compressed Texture format CC_ALPHA: 509 510 (argb5555) (2-bit/texel) 511 mode[2:0] lerp alpha2 alpha1 alpha0 color2 color1 color0 texel 31 to 16 texel 15 to 0 512 3 1 5 5 5 15 15 15 32 32 513 514 [127:125] mode[2:0] 515 [124] lerp 516 [123:119] color2(a5) 517 [118:114] color1(a5) 518 [113:109] color0(a5) 519 [108:104] color2(r5) 520 [103:99] color2(g5) 521 [98:94] color2(b5) 522 [93:89] color1(r5) 523 [88:84] color1(g5) 524 [83:79] color1(b5) 525 [78:74] color0(r5) 526 [73:69] color0(g5) 527 [68:64] color0(b5) 528 [63:62] texel 31 529 ... 530 [33:32] texel 16 531 [31:30] texel 15 532 ... 533 [1:0] texel 0 534 535 In CC_ALPHA format, mode[2:0]=011b, three 20-bit colors color2, 536 color1 and color0 (ARGB5555) are converted to a 32-bit (ARGB8888) 537 format by duplicating the upper 3-bits for the 3 LSBs (all the color 538 channels and the alpha channel are converted from 5-bit formats to 539 8-bit formats using this bit duplication). 540 541 Creating the 32-bit (RGB8888) base colors color2, color1, and color0: 542 543 Color2(alpha) = {[123:119], [123:121]} 544 Color2(red) = {[108:104], [108:106]} 545 Color2(green) = {[103:99], [103:101]} 546 Color2(blue) = {[98:94], [98:96]} 547 Color1(alpha) = {[118:114], [118:116]} 548 Color1(red) = {[93:89], [93:91]} 549 Color1(green) = {[88:84], [88:86]} 550 Color1(blue) = {[83:79], [83:81]} 551 Color0(alpha) = {[113:109], [113:111]} 552 Color0(red) = {[78:74], [78:76]} 553 Color0(green) = {[73:69], [73:71]} 554 Color0(blue) = {[68:64], [68:66]} 555 556 When lerp = 0 (bit 124 = 0), the converted 32-bit colors color2, 557 color1, and color0 are used directly as the first 3 entries in the 558 4-entry lookup table. The last entry in the 4-entry lookup table, 559 accessed with index=3, is defined to be transparent black (rgb=00h, 560 alpha=00h). A total of 4 colors are therefore available for 2-bit 561 index per texel selection, and the 32-bit (ARGB8888) color value for 562 all texels is obtained by performing table lookup using each texel's 563 2-bit index. 564 565 Table Lookup (when lerp = 0): 566 567 Index of texel 31 to 0 Color for texel 31 to texel 0 568 (ARGB8888) 569 570 0 Color[0] = color0 alpha = alpha0 571 1 Color[1] = color1 alpha = alpha1 572 2 Color[2] = color2 alpha = alpha2 573 3 Color[3] = 000000h alpha = 00h 574 575 When lerp = 1 (bit 124 = 1), the converted 32-bit colors color2 and 576 color1 are used as the 32-bit base colors for texels 31 to 16, and 577 the converted 32-bit colors color1 and color0 are used as the base 578 colors for texels 15 to 0. The 32-bit base colors are then used to 579 create 2 more levels of color through linear interpolation. A total 580 of 4 colors are therefore available for 2-bit index per texel 581 selection, and the 32-bit (ARGB8888) color value for all texels is 582 obtained by performing table lookup using each texel's 2-bit index. 583 584 Creating the 4 colors used in the 4-entry lookup table from the 585 32-bit base colors (when lerp = 1): 586 587 For texel 31 to texel 16 588 Color[0] = color2[a,r,g,b] 589 Color[1] = (2 * color2[a,r,g,b] + color1[a,r,g,b] + 1) / 3 590 Color[2] = (color2[a,r,g,b] + 2 * color1[a,r,g,b] +1) / 3 591 Color[3] = color1[a,r,g,b] 592 593 For texel 15 to texel 0 594 Color[0] = color0[a,r,g,b] 595 Color[1] = (2 * color0[a,r,g,b] + color1[a,r,g,b] +1) / 3 596 Color[2] = (color0[a,r,g,b] + 2 * color1[a,r,g,b] +1) / 3 597 Color[3] = color1[a,r,g,b] 598 599 Table Lookup (when lerp = 1): 600 601 Index of texel 31 to 0 Color for texel 31 to texel 0 602 (ARGB8888) 603 604 0 color[0] 605 1 color[1] 606 2 color[2] 607 3 color[3] 608 609Revision History 610 611 0.1, 01/12/00 dwm: Initial revision. 612 0.2, 02/09/00 dwm: Respond to feedback from Intel. 613 0.3, 02/23/00 dwm: Respond to feedback from Intel. 614 0.4, 04/12/00 dwm: Updated to reflect final version of the 615 ARB_texture_compression extension. 616 617 618Copyright 1999-2000, 3dfx Interactive, Inc. 619All rights reserved. 620