Jump to content
  • Advertisement


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


Set Sprites Alpha Color?

This topic is 5405 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
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,

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!