Jump to content
  • Advertisement

Archived

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

DevLiquidKnight

Alpha blending...

This topic is 5289 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

Basically i got a vertex buffer that is fading however.. I was hoping I could make it fade more gradually... currently the way im doing it you can tell a difference.. I have each particle with a life value and the life value currently determains the alpha value, but to define the alpha value it must be a DWORD data type, eg.. 0xffffffff = not transparent, 0x7fffffff = partly transparent the first 2 values of the dword determain the alpha value. I was wondering if there is a way I can take the life span of the particle which is defined as an integer and only edit the first 2 hex values in the dword.. If that makes any sense.... basically i want this: 0x(lifevalue here)-ff-ff-ff instead of 0x77-ff-ff-ff the '-' things are just so you can see better any ideas? [edited by - DevLiquidKnight on January 24, 2004 1:24:27 AM]

Share this post


Link to post
Share on other sites
Advertisement
Perhaps change the color to D3DXCOLOR(), which is the same thing really. Then change the life to a float value. Now just do
D3DXCOLOR(1.0f, 1.0f, 1.0f, particle.life)

Share this post


Link to post
Share on other sites
thanks thats exactly what i needed now all i gotta do is figure out billboardng.. but ill post that somewhere else

[edited by - DevLiquidKnight on January 24, 2004 2:06:24 AM]

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!