Jump to content
  • Advertisement

Archived

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

dacrisxp

Alpha textures

This topic is 6116 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''m currently trying to load textures with an alpha channel. The files are of type "TGA". I tried loading with D3DXCreateTextureFromFile (regular) and the EX version, and the alpha channel doesn''t load. Is it possible to load textures with alpha channel in DirectX? And how is it done? Thanks for your help.

Share this post


Link to post
Share on other sites
Advertisement
Yes, but in some cases, the program that saves the targa file doesn''t create the alpha channel correctly.

Try this - use the DirextX texture tool to explicitly create a .dds file with an alpha channel and load that file with the D3DX functions. Once you are assured that your code works (it should), try the .tga file. If you don''t get the alpha channel it''s probably the file not the code.

How are you checking the alpha channel? Is it possible you simply don''t have alpha blending enabled? (just checking...)

Share this post


Link to post
Share on other sites
Thanks for your information. Actually it was the code. I found a great tutorial on alpha-blended textures, and now it works perfectly, with TGA files. Thanks again.

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!