Jump to content
  • Advertisement
Sign in to follow this  
Dark Schneider

which are the differences between DXTC 2-5 format?

This topic is 4106 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I think I don't understand well how DXTC 2 to 5 works, correct me if I am wrong. - DXTC 2-3 uses 4 bit alpha, so we have 16 transparency levels, but what is pre-multiplied?, when I load textures in DX Texture Tool I only see that in DXTC2 there is dithering and in DXTC3 not. - DXTC 4-5 uses 6/8 bit interpolated alpha, so we have more alpha levels, but with a bigger computation cost (the algorithm is inside DX documentation). And I suppose then that the pre-multiplied is the same, use dithering or not. Is this correct?.

Share this post


Link to post
Share on other sites
Advertisement
Tom Forsyth has a pretty detailed discussion of premultiplied alpha and DXT textures here.

Regrading DXT2-3 vs DXT4-5, it's a tradeoff between alpha precision and flexibility.

With DXT3, you get separate 4 bits per pixel for each of the 16 pixels in the block. It's low accuracy, but each pixel can have its own value.

With DXT5, a maximum of 8 evenly spaced values are possible. This means that if each pixel in the block originally has an alpha which would be represented by a different 4 bit value in DXT3, you can't represent that. On the other hand, if there's a small range of alphas to the block, DXT5 will represent it much more accurately than DXT3.

DXT5 is often more useful because it can represent better gradients, but I'd suggest that you look yourself at compression results for both DXT3 and DXT5.

Share this post


Link to post
Share on other sites
DXT2 and 3 are identical. DXT4 and 5 are identical. They were seperated to try and let the app know when the data is premultiplied, which is silly because there is no way to check for any other formats, so if you care you have another scheme anyway. Hardware treats them the same, it's only supposed to be a hint for your app. In D3D10 they've dropped the duplicate types.

Premultiplied means that the color is stored already multiplied by alpha. If you have a white texture, and alpha = 0.5, the stored color would be 128 grey. If your alpha was 0, the stored color would be black. DXT1 is effectively premultiplied because transparent gets decoded as transparent black.

Tom's site covers why premultiplied textures rock.

Share this post


Link to post
Share on other sites
Quote:
Original post by Namethatnobodyelsetook
Tom's site covers why premultiplied textures rock.

a link for the lazy.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!