Alpha textures
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.
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...)
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...)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement