Alpha blending...

Started by
1 comment, last by DevLiquidKnight 20 years, 3 months ago
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]
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)
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]

This topic is closed to new replies.

Advertisement