Jump to content
  • Advertisement
Sign in to follow this  

How to blend 3 texture in the .X file?

This topic is 5403 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Now I want blend 3 texture the code is: pd3dDevice->SetTextureStageState( 0, D3DTSS_COLOROP,D3DTOP_DOTPRODUCT3 ); pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1,3DTA_TEXTURE ); pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG2,3DTA_DIFFUSE ); pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP,D3DTOP_SELECTARG1 ); pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1,D3DTA_TEXTURE ); pd3dDevice->SetTextureStageState( 1, D3DTSS_COLOROP,D3DTOP_MODULATE ); pd3dDevice->SetTextureStageState( 1, D3DTSS_COLORARG1,D3DTA_TEXTURE ); pd3dDevice->SetTextureStageState( 1, D3DTSS_COLORARG2,D3DTA_CURRENT ); pd3dDevice->SetTextureStageState( 1, D3DTSS_ALPHAOP, D3DTOP_DISABLE ); pd3dDevice->SetTextureStageState(2,D3DTSS_COLOROP,D3DTOP_MODULATEALPHA_ADDCOLOR ); pd3dDevice->SetTextureStageState( 2, D3DTSS_COLORARG1,D3DTA_TEXTURE ); pd3dDevice->SetTextureStageState( 2, D3DTSS_COLORARG2,3DTA_CURRENT ); pd3dDevice->SetTextureStageState( 2, D3DTSS_ALPHAOP, D3DTOP_DISABLE ); pd3dDevice->SetMaterial( &m_pMaterials ); pd3dDevice->SetTexture(0,NormalMap); pd3dDevice->SetTexture(1,TexLightMap); pd3dDevice->SetTexture(2,m_pTextures ); But I found when use this to .X file they are not right I found it can only display first texture NormalMap,I don't know how to display 2 and 3 texture ???

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!