Original Post
Hello, in learning to program DirectX, I believe I've come across a bug in transparency in my program. Screenshot 1 (~280Kb) is how the demo is supposed to look. This is an image of an alpha blended textured quad, above a no-alpha textured polygon, all above another alpha-blended textured quad. The scene looks fine from above, you can see all three objects through the top alpha-blended quad, as seen in Screenshot 1, HOWEVER, when the camera is below the scene, looking upwards, this is a different issue. When seen from below (See screenshot 2) the bottom-most textured quad is improperly alpha-blended. When seen looking-through the bottom quad, one cannot see the top-most quad, yet you can see the un-alpha-blended textued poly in the middle! Try the .exe, you'll see what I mean. 1 . For reference, my alpha-blending code is: [Edited by - Muhammad Haggag on December 6, 2005 9:35:33 AM]
D3D_Device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
D3D_Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
D3D_Device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);