Jump to content
  • Advertisement


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


Object Transparancy

This topic is 5230 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!