Skip to main content
GameDev.net gamedev.net
🔒 Locked

Vertex Transparency DirectX 9

Started by erm1 Dec 8, 2013 at 12:14 AM 3 replies 2.6k views
Original Post
erm1
erm1

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 .

Medo Mex
Medo Mex

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 );
erm1
erm1

Thanks I'll try that right now !

erm1
erm1

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

Thanks anyway.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.