Jump to content
  • Advertisement

Archived

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

DevLiquidKnight

Set Sprites Alpha Color?

This topic is 5324 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 was wondering how do you set the sprites alpha color in Direct3D so Direct3D knows that a certain color means transparent? Or a texture's alpha color? [edited by - DevLiquidKnight on February 26, 2004 7:45:21 PM]

Share this post


Link to post
Share on other sites
Advertisement
Say your transparent colour is Magenta (aka Magic Pink), pass 0xFFFF00FF as the colour key and it will set all of those texels to have an alpha of 0. Similarly, if your transparent colour is black, pass 0xFF000000. Note the Alpha component of the colour is always FF since you want to filter out Opaque Black.

That''s pretty much all there is to it.


Stay Casual,

Ken
Drunken Hyena

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!