Sign in to follow this  

DirectX 9 Surface Transparency

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this