not getting this texture blending.. help
Thanks for replying.
You can still achieve the same effect, but you'll have to use multipass blending.
Essentially, draw the first texture, normal.
Then enable alpha blending, and set source and dest blend to 1. This will set the alpha blending to be "Final = Source + Dest"
Draw the polygon with the second texture.
The obvious drawback of this is that the Riva128 has a substantially lower fill-rate than a two-stage card, like the Voodoo 2 or 3 and the TNT 1 and 2, but we're asking it to draw twice as much.
//first texture
lpd3ddev->SetTextureStageState(0,D3DTSS_COLOROP,D3DTOP_SELECTARG1 );
lpd3ddev->SetTextureStageState(0,D3DTSS_COLORARG1, D3DTA_TEXTURE );
//second texture
lpd3ddev->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_ADD );
lpd3ddev->SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE );
lpd3ddev->SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_CURRENT );
The textures are all set up and all of that stuff. my understanding is that the above should simply add the two textures. but, i'm just getting the first texture component. Also, are the stages supposed to control the diffuse and specular lighting or just emphasize them? i mean, if i don't include the lighting components into the blending, will lighting still occur? Oh, and do the lighting components in blending use the vertex color in the vertex structure or the one calculated by auto lighting?
Thanks in advance.
Alex