hi,
Seems that color/alpha operations interprets the color component of D3DFMT_A8 textures as rgb(0,0,0).
So you have to select the color component from the material/vertex color and the alpha component from the alphamap:
_d3d9Device.SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1)
_d3d9Device.SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_CURRENT)
_d3d9Device.SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1)
_d3d9Device.SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE)
Then you can modulate the color texture:
_d3d9Device.SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_MODULATE )
_d3d9Device.SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_CURRENT)
_d3d9Device.SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_TEXTURE)
Of course, alpha blending must be enabled:
_d3d9Device.SetRenderState( D3DRS_ALPHATESTENABLE, False)
_d3d9Device.SetRenderState( D3DRS_ALPHABLENDENABLE, True)
_d3d9Device.SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA)
_d3d9Device.SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA)