Jump to content
  • Advertisement
Sign in to follow this  
mrvaibhavpanchal

DirectX 9 Surface Transparency

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

Hi I am trying to make a game using surface in DirectX 9 April2006 version in VC++ through Vb6. I ve loaded the surface sucessfully and made iages in a8r8g8b8 format throught adobe photoshop cs2 and direct texture tool... When I load first surface into backbuffer and display it, it works fine.However, when I load another surface into Backbuffer 250*250 pixel rectangle...Though its showing the surface but the transparency is not coming. Instead eiter white colour or black colour is coming.. I have already enabled alpha enable function.. Already set Alpharef. Already done alphafunc So please tell me what did I miss or why is this problem coming.. Thanks...

Share this post


Link to post
Share on other sites
Advertisement
Alpha blending works with textures and polygons rather than surfaces.

Load your image into a texture and apply that texture to a sprite along with the alpha blending style you require.

If your application uses a depth buffer, you'll likely also want to disable Z buffer writes (ZBufferEnable) and render semi-transparent things after opaque things.

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!