Hmmm
Wouldn't it be more safe to Select the 2nd texture as Alpha argument instead of modulating it with the 1st level.
I mean, you don't define what is the first alpha argument on the first level ... So, if he didn't "reset" the Texture stage states of an other effect(which implies another alpha argument) then it could change the value of alpha, couldn't it ?
Code:
m_pd3dDevice.SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
m_pd3dDevice.SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
m_pd3dDevice.SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
m_pd3dDevice.SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
m_pd3dDevice.SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
m_pd3dDevice.SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_SELECTARG2);
m_pd3dDevice.SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE);
m_pd3dDevice.SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
m_pd3dDevice.SetTextureStageState(1, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
This is how I would do ... Maybe I'm wrong lol
Bye
Avatar
ps : By the way, didn't you made a mistake writing COLORARG instead of ALPHAARG ?
Bookmarks