Original Post
Hello. I'm loading a texture with this function: D3DXCreateTextureFromFileEx(g_d3d_device, "can.jpg", 0, 0, 0, 0,D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT,D3DX_DEFAULT, D3DCOLOR_XRGB(0,0,0), NULL, NULL, &g_pTexture); I want black color (0,0,0) to be transparent. What textureStageType should i set to achieve this ? I tried this but don't work: g_d3d_device->SetTextureStageState(0, D3DTSS_ALPHAOP,D3DTOP_SUBTRACT);