D3DDevice->SetTextureStageState(0,D3DTSS_COLORARG2,D3DTA_CURRENT);
refer to what is already on the device?
How can I multiply my texture with what is on the screen already?
Robin
Current texture
does
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..
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 );
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement