Jump to content
  • Advertisement


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


hardware Alpha-blending

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

Is there any hardware support for alpha blending in DirectDraw? From what I''ve read it''s done in Direct3d, but all the alpha-blending stuff I see in the tutortorials is software alpha-blending. I would like to incorporate alpha-blending into my engine (for fog overlays etc.) but I would like to do it in hardware if at all possible.. -Zims

Share this post

Link to post
Share on other sites
No there''s no hardware Alpha blending support in DirectDraw, however you can do two things:
1.) Use Direct3D to do a 2d game by create a 2 triangle which are positioned to take up the whole screen... A virtual 2D surface then you can texture these triangles with what would be your game''s screen and alpha blend over them etc, etc... Never done this but heard of it and seen it in tutorials...

2.) Use software, which isn''t so bad actually, just make sure you use MMX. There''s a good tutorial on MMX enhanced Alpha Blitting in the Resource section here on GameDev.Net, using C or C++ and some inline assembly (Actually a LOT of inline assembly)

Software is probably fine, just be wise with your resources. You can also create a 50/50 alpha blending that only does the 50/50 ratio between two images but it''s MUCH faster than true alpha blending, so for things like clouds and fog you coulde just go 50/50 between the cloud and ground/units/trees etc...

See ya,

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!