Archived

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

Saiz

transparent glass cockpit

Recommended Posts

Hi, I have problems with my Voodoo 3 to get a transparent glass cockpit making use of the typical senteces, m_d3dDevice.SetRenderState D3DRS_ALPHABLENDENABLE, 1 m_d3dDevice.SetRenderState D3DRS_SRCBLEND, D3DBLEND_SRCCOLOR m_d3dDevice.SetRenderState D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR Any suggestion? Thank you, Saiz

Share this post


Link to post
Share on other sites
I am not sure, but would it not be wiser to use D3DBLEND_SRCALPHA and D3DBLEND_INVSRCALPHA. The alpha channel is simpler to control the transparency, and will probably work on more cards.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Thanks Chock,
But the problem (what I know) is that this solution adds transparency, but doesn''t absorb the background color. When you see through that kind of glass the background is clearer.
Saiz

Share this post


Link to post
Share on other sites
With alpha blending you need to presort your objects and then draw them back to front!

I don''t know if this would help but I had a similar problem with a particle system I was writing that alpha blended all the particles. I was drawing them in the wrong order.




D.V.

Share this post


Link to post
Share on other sites