Sign in to follow this  
Duel93

Compressed Texture Translucency

Recommended Posts

Anyone have a method to determine if a compressed texture (DXT1/DXT3/DXT5) is translucent? Checking if it has an alpha component does not necessarily mean it's translucent.

Share this post


Link to post
Share on other sites
Obviously this information isn't encoded in the texture but in a separate asset, such as the material descriptor. Id tech for example use the keywork BlendFunc (if memory serves), if no blend is specified then the alpha component is discarded... the texture itself knows nothing about blend, the alpha could be a gloss map as well.

Share this post


Link to post
Share on other sites
I agree. However, if the alpha is 255 for the dxt5, then we can assume that no blend operations are going to be used on that texture (???)

Share this post


Link to post
Share on other sites
Yes, if all pixels have alpha=255 then the alpha channel is redundant since the HW will fetch 1.0 for those pixels automatically.
It's a rather weird case. Theorically this shouldn't happen in the first place.

This doesn't magically imply blend won't take place - alpha could be injected by other means, such as a per-vertex RGBA color.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this