Jump to content
  • Advertisement
Sign in to follow this  
Kackurot

Drawing sprites alpha blended

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

Ok question, Does anyone know how to draw a sprite in direct3d alpha blended? I already got it to show up and colorkeyed but I want to alpha blend only the sprite. I tried to do it with using vertex alpha,but it made the colorkey part show up blended with the sprite. So, can anyone help with my problem?

Share this post


Link to post
Share on other sites
Advertisement
Hi there Kackurot, How are you doing?
How are you doing?

[The Problem]
Drawing alpha blended sprites in Direct3D?

[The Solution]
You have to specify the D3DXSPRITE_ALPHABLEND flag when you prepare a device for drawing sprites.

example:

sprite.Begin(D3DXSPRITE_ALPHABLEND);
sprite.Draw(...);
sprite.End();




I hope this helps.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!