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


Object Transparancy

Recommended Posts

dragon9    122
In DX9, how do I use SetRenderState with D3DRS_SRCBLEND and D3DRS_DESTBLEND to gradualy make an entire object fade to 100% transparent over time? What I want to do is each frame scale the minimum transparancy level from 0% to 100%. Is there a better way to do this? Thanks...

Share this post

Link to post
Share on other sites
aker_jus    122
For alpha blending, use SRC = SRCALPHA and DEST = INVSRCALPHA

For the object to fade, you can change the Alpha component of your material color, or change the vertex color''s Alpha component (if you are using vertex coloring instead of d3d lighting). You can also use Texture factor renderstate and a combination of
D3DTA_TEXTURE and D3DTA_TFACTOR for texture modulation and make Tfactor a color with some alpha < 255.


3D Graphics & Solutions

Share this post

Link to post
Share on other sites