Original Post
I'm having a lot of trouble getting the black areas of textures to show up as transparent using an alpha test. I'm loading a texture like this:
D3DXCreateTextureFromFileEx( m_pObjectDevice, strPath, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, D3DX_FILTER_TRIANGLE, D3DX_FILTER_TRIANGLE, 0xFF000000, NULL, NULL, &m_pMeshTextures[j] );
And testing for black pixels like this:
m_pObjectDevice->SetRenderState(D3DRS_ALPHAREF, (DWORD)0x00000001);
m_pObjectDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE);
m_pObjectDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL);
However, the black background on the texture is still showing up and is NOT transparent. I'm using DX9, BTW.
What am I doing wrong?
Tony
[edited by - Tones2 on January 13, 2003 7:28:26 AM]