Jump to content
  • Advertisement

Archived

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

Vizual

ID3DXSprite alphablending?

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

ID3DXSprite has done everything I wanted except alphablending. Am I able to do alphablending with it?

Share this post


Link to post
Share on other sites
Advertisement

D3DXSprite does alpha blending if the texture has alpha. You can either use a file format with an alpha channel (PNG is one) or when you load the file you can specify a colour key.

Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
Look, I already use the transparency parameter so it doesn’t show black pixels which would form a black square around the ship if I don’t use it. After I do COLORKEY transparency I want the ship to be translucent at certain points in my game so I can see the tile behind it. I have no clue how to do this.

[edited by - Vizual on May 3, 2002 5:36:50 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Use the DirectX Texture Tool from the SDK to make .dds files...

Share this post


Link to post
Share on other sites
K, you didn''t give a lot of detail, so I started with the basics. Generally the more (significant) info you give, the better able we are to give you good answers.

If I''m reading you second post correctly, you want to alter the global transparency of the ship (and alpha fade or something) at certain times in your game. If that''s the case, the Draw method takes a color paramter and you can use that to modulate the alpha. passing 0x7FFFFFFF instead of 0xFFFFFFFF will make it 50% opaque.

If on the other hand you want parts of your ship to be semi-transparent, then you''ll need an alpha channel in your texture.

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!