Archived

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

CoolMike

D3DX Alpha Channels

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