if c0 is bigger than c1, then:
c2 is set to 2/3rds of c0 + 1/3rd of c1
and
c3 is set to 1/3rd of c0 and 2/3rds of c1.
Top-level
if c0 is bigger than c1, then: 8 comments
so now you have 4 colors, c0 through c3. The final 32 bits of the subblock is an index into this palette, with two bits per pixel. so yeah. dxt1 works by having you define two colors, they get an extra bit of metadata by making the order of the colors important, then generate 2 more colors based on those colors + metadata. ugh it turns out it's hard to decode 0-width fonts, thanks to divisions. I'm now mass-converting all the textures. |
but if c1 is bigger than c0, then:
c2 is set to 1/2 c0 and 1/2 c1, and c3 is set to transparent black.