Jump to content
  • Advertisement

Archived

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

fdisano

alpha blending

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

I''m building a sprite library that displays sprites as textures on polygons and I''m trying to implemented varying levels of transparency but I''m having some trouble. I''m only able to get 50% transparency even though I''m setting the vertex alpha values to other values. Basically I''m trying to overlay my sprite over the background with varying levels of transparency. What are D3DRENDERSTATE_SRCBLEND and D3DRENDERSTATE_DESTBLEND render state combinations to do this? ANy help would be great! Fredo ~----------------------------~ Fred Di Sano System Programmer Artech Studios Ottawa.CA ~----------------------------~

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Are you sure your pixelformat/textureformat supports enough alpha bits to show many levels (e.g. 32bit modes)?

Share this post


Link to post
Share on other sites
Yeah, I''m in 32-bit mode.

~----------------------------~
Fred Di Sano
System Programmer
Artech Studios
Ottawa.CA
~----------------------------~

Share this post


Link to post
Share on other sites
I use 16bits for transparency. 32 is not a problem.

I think, you may play with diffuse.a component for a many effect of transparency. (or emissive or specular?, try all!). I change this in the material and may generate many level of transparency. The point is to choice the best renderstate (srcblend and destblend). And you MUST check the compatibility with the hardware!!. In my old ati, some sample work perfecty, but in voodoo3, always see black!.


-eng3d.softhome.net-

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!