Multitextureing
I just want to blend to textures together.
I copied this code from the
"Direct3D 7 Immediate Mode Framework Programming 3: Multitexturing " article.
But it doesn''t work! I'' checked the hardware, and it supports
multitextureing. I even use the same textures...
but I use dxsdk81 instead of 7.0
m_pd3dDevice->SetTexture(0, D3DTextr_GetSurface("wall.bmp"));
m_pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
m_pd3dDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
// Set darkmap
m_pd3dDevice->SetTexture(1, D3DTextr_GetSurface("env0.bmp"));
m_pd3dDevice->SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE);
m_pd3dDevice->SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_CURRENT);
You also need to set the
Replace
codeka.com - Just click it.
D3DTSS_COLOROP
texture state for stage 1. The default for stage 0 is D3DTOP_MODULATE
, and for all other stages it''s D3DTOP_DISABLE
. That means you need to add the following:m_pd3dDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_MODULATE );
Replace
D3DTOP_MODULATE
with whatever effect you''re looking to achieve (modulate multiples the inputs, which may not be what you want...) codeka.com - Just click it.
I''ve tried that too...
only on texture is shown... but it''s alot darker.
I''ve used the same textures that are used in the multitexturing article
http://www.gamedev.net/reference/articles/article1028.asp
only on texture is shown... but it''s alot darker.
I''ve used the same textures that are used in the multitexturing article
http://www.gamedev.net/reference/articles/article1028.asp
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement