Jump to content

  • Log In with Google      Sign In   
  • Create Account

Vertex Transparency DirectX 9


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
4 replies to this topic

#1 erm1   Members   -  Reputation: 119

Like
0Likes
Like

Posted 07 December 2013 - 06:14 PM

Hello,

 

I have always been stuck on this one which is how to use the vertex alpha component in a mesh that has,  Position, Color, Uv, & Normals.

 

I found something that mentioned this  :

 

d3d->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE);

 

but it does not seem to work.

 

Any ideas ?

 

Thanks in advance .

 

 

 



Sponsor:

#2 Medo3337   Members   -  Reputation: 665

Like
0Likes
Like

Posted 07 December 2013 - 06:36 PM

Try something like the following:

device->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
device->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA );
device->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
device->SetRenderState( D3DRS_BLENDOP, D3DBLENDOP_ADD );


#3 erm1   Members   -  Reputation: 119

Like
0Likes
Like

Posted 07 December 2013 - 07:59 PM

Thanks I'll try that right now !



#4 erm1   Members   -  Reputation: 119

Like
0Likes
Like

Posted 07 December 2013 - 08:04 PM

OH yes, but actually, thinking about it. I just want the vertex transparency without having to use vertex blending,

 

Thanks anyway.



#5 Steno   Members   -  Reputation: 115

Like
0Likes
Like

Posted 10 December 2013 - 10:42 PM

You might also have to set the Texture stage rendering:  

http://msdn.microsoft.com/en-us/library/windows/desktop/bb174462(v=vs.85).aspx

 

Basically, set your texture stages to use diffuse transparency (don't forget to set the materials).






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