Hello,

im not sure what the method is called, but basically, i want to put 2 textures on top of each other, while setting a specific color in the second texture to be transparent.

ive tried almost every possibility imaginable, heres the code i used: (notice the sections commented out from failed attempts)

Code:
g_Device->SetTexture(0, woodtex); //wood.png
g_Device->SetTexture(1, bloodtex); //blood.png


/*g_Device->SetTextureStageState(0, D3DTSS_TEXCOORDINDEX, 0);
g_Device->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG2);
g_Device->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_DIFFUSE);
g_Device->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_TEXTURE);
g_Device->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
g_Device->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE);*/

//g_Device->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 0);
//g_Device->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
//g_Device->SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE);

//g_Device->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE);
//g_Device->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_MODULATE);

//g_Device->SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_CURRENT);

/*g_Device->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE);
g_Device->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
g_Device->SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);*/

g_Device->SetTextureStageState(0, D3DTSS_TEXCOORDINDEX, 0);

g_Device->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG2);
g_Device->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_DIFFUSE);
g_Device->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_TEXTURE);

//g_Device->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
//g_Device->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_CURRENT);

g_Device->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 0);

g_Device->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_SELECTARG2);
g_Device->SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_CURRENT);
g_Device->SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_TEXTURE);

g_Device->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
g_Device->SetTextureStageState(1, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
g_Device->SetTextureStageState(1, D3DTSS_ALPHAARG2, D3DTA_CURRENT);

//g_Device->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_BLENDTEXTUREALPHAPM);
//g_Device->SetTextureStageState(1, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
//g_Device->SetTextureStageState(1, D3DTSS_ALPHAARG2, D3DTA_CURRENT);

g_Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
g_Device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);

g_Device->SetRenderState(D3DRS_ALPHABLENDENABLE, true);

g_Device->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, testquad);

g_Device->SetRenderState(D3DRS_ALPHABLENDENABLE, false);
the transparent color is the green in blood.png, i want that part to show through to the wood (so far all i could manage was making it show through to the Clear(..) color)

here are the images im using: