Posted 02 January 2000 - 08:41 AM
I''m working on a 3d engine to render a landscape. I''m using generic textures for the terrain, and for some tiles i''d like to add a road texture over the normal grass (or snow,desert,...) texture. So i''ve saved my road texture in a .DDS file (using the tool included with the DX7 SDK) in DXT1 format (1 alpha bit, 15 rgb bits). The file is ok when testing it with the DX7 "compress" sample. But impossible to render the road right in my engine, it seems like D3D ignore the alpha channel (although ALPHABLENDENABLED is set to TRUE, and SRC_BLEND to SRC_ALPHA). The file is loaded by D3DXCreateTextureFromFile(), and the video mode color depth is 16 bits (initialized by D3DXCreateContextEx). I''ve tried to change the numAlphaBits param of this function, but it doesn''t improve anything. What can i be doing wrong?
Thanks in advance for any help!