The Texture Operation UnitBefore Direct3D 6 the pipeline stages determined the texel color and blended this color with the color of the primitive interpolated from the vertices (multipass texturing). From Direct3D 6 up to 8 texture operation units can be cascaded together to apply multiple textures to a common primitive in a single pass (multitexturing). The results of each stage carry over to the next one, and the result of the final stage is rasterized on the polygon. This process is called "texture blending cascade". Each texture operation unit has six associated render states, which control the flow of pixels through the unit, as well as additional render states associated with filtering, clamping and so on.
Three of the render states in each texture operation unit are associated with RGB (color), and another three are associated with alpha.
Multitexturing SupportFirst, you have to check your 3D hardware's multitexturing support in the framework call ConfirmDevice():
...
HRESULT CMyD3DApplication::ConfirmDevice
(DDCAPS* pddDriverCaps, D3DDEVICEDESC7* d3dDeviceDesc )
{
// Accept devices that really support multiple textures.
if( pd3dDeviceDesc->wMaxTextureBlendStages > 1 )
if( pd3dDeviceDesc->wMaxSimultaneousTextures > 1 )
if( pd3dDeviceDesc->dwTextureOpCaps & D3DTEXOPCAPS_MODULATE )
return S_OK;
return E_FAIL;
}
...
|
|