Jump to content

  • Log In with Google      Sign In   
  • Create Account


not getting this texture blending.. help


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 AlexM   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 November 1999 - 04:22 AM

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


Sponsor:

#2 mhkrause   Members   -  Reputation: 122

Like
Likes
Like

Posted 28 October 1999 - 06:22 PM

What 3D card do you have?

#3 AlexM   Members   -  Reputation: 122

Like
Likes
Like

Posted 28 October 1999 - 06:38 PM

nVidia ZX 8 mgs

#4 AlexM   Members   -  Reputation: 122

Like
Likes
Like

Posted 28 October 1999 - 06:49 PM

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.

#5 mhkrause   Members   -  Reputation: 122

Like
Likes
Like

Posted 28 October 1999 - 08:21 PM

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.


#6 kj   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 November 1999 - 04:22 AM

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)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS