Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

CoolMike

D3DX Alpha Channels

This topic is 6668 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

Does anybody know how to load an Alpha Channel of a bitmap in D3DX? I want to be able to define where my texture is completely transparent and where it is completely opaque. Any thoughts?

Share this post


Link to post
Share on other sites
Advertisement
If you save your textures as 32 bit TGA they have alpha channels, then you can load the texture with D3DXCreateTextureFromFile(). D3DX automatically loads the alpha channel as well.

TGA''s can be saved with Photoshop and probably a lot of other programs as well.

If you don''t have 32 bits TGA files you can by your self arrange the pixels of your texture into 32 bit RGBA and then use D3DXLoadTextureFromMemory() to load it into a texture.

- WitchLord

Share this post


Link to post
Share on other sites
Yuo could try that Texture Tool that comes with the DX7 SDK. You can use that to load the colours of a texture, and then add the alpha from a seperate grey scale image, then save it as a ".dds" file. In your program you can use that D3DXCreateTextureFromFile function to load it. That's the way I do it.


- IO Fission

Tearing 'em apart for no particular reason...

Edited by - IO Fission on June 17, 2000 4:19:19 AM

Share this post


Link to post
Share on other sites

  • 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!