Original Post
Hey guys. I know this topic has been addressed before, but the search is being dumb (sql timeout after blah blah seconds...etc) and I can't find any resources on it. Story is, I'm doing multitexturing in C++ using Direct3D 9.0c and I can't figure out all of the texture stage state settings. I'm trying to blend two textures over a single triangle in one pass, using the alpha value on each vertex to change how much each texture is applied, and mix the textures with the diffuse color of that vertex. This is what I've got right now, but the alpha blending doesn't affect the amount of each texture--they're just blended evenly.
myD3DDevice->SetTextureStageState( 0, D3DTSS_TEXCOORDINDEX, 0 );
myD3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 );
myD3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE );
myD3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
myD3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE );
myD3DDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_LERP );
myD3DDevice->SetTextureStageState( 1, D3DTSS_TEXCOORDINDEX, 0 );
myD3DDevice->SetTextureStageState( 1, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 );
myD3DDevice->SetTextureStageState( 1, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE|D3DTA_COMPLEMENT );
myD3DDevice->SetTextureStageState( 1, D3DTSS_COLORARG1, D3DTA_TEXTURE );
myD3DDevice->SetTextureStageState( 1, D3DTSS_COLORARG2, D3DTA_CURRENT );
myD3DDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_LERP );
myD3DDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE ); Edit: fixed a typo