DirectX 9 Surface Transparency

Started by
1 comment, last by mrvaibhavpanchal 17 years, 11 months ago
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...
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.

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Thanks buddy,

Its worked now thourgh Sprites...I was wondering was it isn't coming and spent my 7 hours researching that.

Thanks..

Cheers

Vaibhav

This topic is closed to new replies.

Advertisement