Original Post
hi
Im quite new to direct3d, and im currently playing with alpha blending, i have a very simple scene with a textured building and very simple textured 3 vertex triangle floor.
I wanted to make the building semi-transparent so i could see some of the texture of the grass through it, so i added the following lines to the code.
(The scene is cleared to this blue color before rendering). So the question is, is it possible to make the grass visible through the building? what am i doing wrong..
[edited by - quant on November 25, 2003 11:42:17 AM]
I wanted to make the building semi-transparent so i could see some of the texture of the grass through it, so i added the following lines to the code.
g_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,TRUE); g_pd3dDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_SRCALPHA); g_pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ZERO);I was expecting to be able to see the grass texture through the building, but instead i got this..
(The scene is cleared to this blue color before rendering). So the question is, is it possible to make the grass visible through the building? what am i doing wrong..
[edited by - quant on November 25, 2003 11:42:17 AM]