Jump to content
  • Advertisement
Sign in to follow this  
SpaceMonkey1000

Texture splatting does not work

This topic is 4750 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

Hi all! I tried to implement texture splatting and i think i have done everything right. So i set the alphablend to true and set the texture stages correct. But it does not want to work... The whole terrain just gets rendered without alpha so i cant see what i make wrong. device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); device->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); device->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE); device->SetTexture(0, alphatexture); device->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_SELECTARG1); device->SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE); device->SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); device->SetTextureStageState(1, D3DTSS_ALPHAARG1, D3DTA_CURRENT); device->SetTexture(1, texture); dev->DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0, nrVerts, 0, nrTris); What could i make wrong? Thank you very much!!!

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!