Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Vertex Transparency DirectX 9

4: Adsense

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   

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 .

 

 

 



#2 Medo3337   Members   

891
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   

119
Like
0Likes
Like

Posted 07 December 2013 - 07:59 PM

Thanks I'll try that right now !



#4 erm1   Members   

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   

118
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.