DirectX 9 Surface Transparency
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...
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement