Archived

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

not getting this texture blending.. help

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

i just got smart and looked up my hardware caps, as you suggested. i guess from the looks of it my HAL can't do blending (allows max 1 arg). Does that mean i can't do transperancies either? it's all because of my video card, right?
Thanks for replying.

Share this post


Link to post
Share on other sites
Yeah, Riva128's only have a single texture blending stage.

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.

Share this post


Link to post
Share on other sites
i'm trying to blend two textures like this:
//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

Share this post


Link to post
Share on other sites
you can still do transparencies with an alpha channel in your textures. Or just set the color key to your transparent color.
(pink or black are usually used)

Share this post


Link to post
Share on other sites