Advertisement Jump to content
Sign in to follow this  
Kackurot

Drawing sprites alpha blended

This topic is 4910 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.

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!