Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
S3 Texture Compression
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== DXT4 and DXT5 == DXT4 and DXT5 (collectively also known as Block Compression 3 or BC3) converts 16 input pixels into 128 bits of output, consisting of 64 bits of alpha channel data (two 8-bit alpha values and a 4Γ4 3-bit lookup table) followed by 64 bits of color data (encoded the same way as DXT1). If <math>\alpha_0 > \alpha_1</math>, then six other alpha values are calculated, such that <math display="inline">\alpha_2 = {{6\alpha_0 + 1\alpha_1} \over 7}</math>, <math display="inline">\alpha_3 = {{5\alpha_0 + 2\alpha_1} \over 7}</math>, <math display="inline">\alpha_4 = {{4\alpha_0 + 3\alpha_1} \over 7}</math>, <math display="inline">\alpha_5 = {{3\alpha_0 + 4\alpha_1} \over 7}</math>, <math display="inline">\alpha_6 = {{2\alpha_0 + 5\alpha_1} \over 7}</math>, and <math display="inline">\alpha_7 = {{1\alpha_0 + 6\alpha_1} \over 7}</math>. Otherwise, if <math display="inline">\alpha_0 \le \alpha_1</math>, four other alpha values are calculated such that <math display="inline">\alpha_2 = {{4\alpha_0 + 1\alpha_1} \over 5}</math>, <math display="inline">\alpha_3 = {{3\alpha_0 + 2\alpha_1} \over 5}</math>, <math display="inline">\alpha_4 = {{2\alpha_0 + 3\alpha_1} \over 5}</math>, and <math display="inline">\alpha_5 = {{1\alpha_0 + 4\alpha_1} \over 5}</math> with <math>\alpha_6 = 0</math> and <math>\alpha_7 = 255</math>. The lookup table is then consulted to determine the alpha value for each pixel, with a value of 0 corresponding to <math>\alpha_0</math> and a value of 7 corresponding to <math>\alpha_7</math>. DXT4's color data is premultiplied by alpha, whereas DXT5's is not. Because DXT4/5 use an interpolated alpha scheme, they generally produce superior results for alpha (transparency) gradients than DXT2/3.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)