Jump to content
  • Advertisement


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


Current texture

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

refer to what is already on the device? How can I multiply my texture with what is on the screen already? Robin

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
that is for multi-texturing, not blending to what''s on teh screen already. you have arg1 and arg2 which tell d3d how to blend the two textures.

so say you wanna color blend (not alpha blend) two texture together in single pass rendering..

neato.m_d3d.m_pDevice->SetTexture(0, first_texture);
neato.m_d3d.m_pDevice->SetTexture(1, second_texture);

Device->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1 );
Device->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
Device->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );
Device->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_DISABLE );

Device->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_MODULATE );
Device->SetTextureStageState( 1, D3DTSS_COLORARG1, D3DTA_TEXTURE );
Device->SetTextureStageState( 1, D3DTSS_COLORARG2, D3DTA_CURRENT );
Device->SetTextureStageState( 1, D3DTSS_ALPHAOP, D3DTOP_DISABLE );

Share this post

Link to post
Share on other sites
just use blending, change the blend renderstate to use multiply (just look through the different blending modes). then draw your poly. dont forget to turn on blending.

Share this post

Link to post
Share on other sites

  • 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!