Archived

This topic is now archived and is closed to further replies.

BlackDragon

MultiTexturing question

Recommended Posts

Im using MS visual c++ 6.0 and DirectX, im trying to put two textures on top of each other. for example i want to do a wall texture and put some graffti on it, the graffti picture has alpha for everything i want to show up, but seems to be blending the alpha values also. These are my texture settings m_pD3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); m_pD3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE ); m_pD3DDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_MODULATE ); m_pD3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1,D3DTA_TEXTURE); m_pD3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG2,D3DTA_TEXTURE); m_pD3DDevice->SetTextureStageState(0, D3DTSS_MAGFILTER, D3DTEXF_LINEAR); m_pD3DDevice->SetTextureStageState(0, D3DTSS_MINFILTER, D3DTEXF_LINEAR); m_pD3DDevice->SetTextureStageState( 1, D3DTSS_COLORARG1, D3DTA_CURRENT ); m_pD3DDevice->SetTextureStageState( 1, D3DTSS_COLORARG2, D3DTA_TEXTURE ); m_pD3DDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_MODULATE ); m_pD3DDevice->SetTextureStageState( 1, D3DTSS_ALPHAOP, D3DTOP_MODULATE ); m_pD3DDevice->SetTextureStageState( 1, D3DTSS_ALPHAARG1,D3DTA_CURRENT); m_pD3DDevice->SetTextureStageState( 1, D3DTSS_ALPHAARG2,D3DTA_TEXTURE); m_pD3DDevice->SetTextureStageState(2,D3DTSS_COLOROP,D3DTOP_DISABLE); m_pD3DDevice->SetTextureStageState(2,D3DTSS_ALPHAOP,D3DTOP_DISABLE); I also was wondering how games like Everquest and others with out door zone detect when a player is in lava, or water. I cant figure out for the life of me how games do this. Thanks for the Help

Share this post


Link to post
Share on other sites