Jump to content
  • Advertisement
Sign in to follow this  
kkangjin

Create DXT1 Format (1bit alpha) Texture

This topic is 4865 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 made a dds(DXT1 RGBA 1bit alpha) file From photoshop nvidia plugin. I then Create a texture using D3DXCreateTextureFromFileEx. D3DXCreateTextureFromFileEx(m_pd3dDevice, "ghost.dds", 0, 0, 1, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_FILTER_NONE, D3DX_DEFAULT, 0, &ImageInfo, NULL, &pd3dTexture); During Render the scene, alpha channel is missing. But using D3DFMT_A8R8G8B8 instead of D3DFMT_UNKNOWN, No problem.. How can I Create DXT1 texture with alpha?

Share this post


Link to post
Share on other sites
Advertisement
Well you might want to check what format the D3DXfunction decides to use when you specify D3DFMT_UNKNOWN - is it an alpha-enabled format that is supported by your particular video card? I thought DXT1 didn't support alpha - not all compresssed formats do, do they?

Share this post


Link to post
Share on other sites
Quote:
Original post by d000hg
I thought DXT1 didn't support alpha - not all compresssed formats do, do they?

DXT1 can use 1 bit alpha.
DXT3 uses a 4 bit alpha channel.
DXT5 includes an interpolated alpha channel (full 8 bit range).
The evenly-numbered DXT formats (DXT2 and DXT4) are pre-multiplied formats that
are rarely used.

kkangjin: Make sure you select DXT1a when exporting using the NVidia plugin. I don't see why D3DFMT_UNKNOWN shouldn't extract an existing alpha channel.

--
Pat.

Share this post


Link to post
Share on other sites
Quote:
Original post by darookie
Quote:
Original post by d000hg
I thought DXT1 didn't support alpha - not all compresssed formats do, do they?

DXT1 can use 1 bit alpha.
DXT3 uses a 4 bit alpha channel.
DXT5 includes an interpolated alpha channel (full 8 bit range).
The evenly-numbered DXT formats (DXT2 and DXT4) are pre-multiplied formats that
are rarely used.

kkangjin: Make sure you select DXT1a when exporting using the NVidia plugin. I don't see why D3DFMT_UNKNOWN shouldn't extract an existing alpha channel.

--
Pat.


Thanks for reply.
It sure was DXT1a.
And DXSDK 9.0 installed.
bug in DXSDK 9.0?

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!