   Mesh Transparency
  Hi,I am trying to set my mesh's .x files trasparency with the code below.It's working but i have a problem.Mesh's transparency increasing white (255,255,255) to black(0,0,0).I mean if mesh's texture is white it is more opaque but if the texture is black it is transparent.I want to revers it.Black to white opaque to transparent.Does anyone have any idea about it?[sourcecode] // alpha on pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); // choose a blending type pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); pd3dDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_BOTHSRCALPHA);[sourcecode]
  If you're loading the material's texture yourself, check what colour key you're passing to D3DXCreateTextureFromFileEx, or whatever you're using.Another thing to check is if there's a MeshVertexColors section in the .x file. (Obviously you can only check this if it is a text X file).If so, then perhaps the problem is that the vertex colours' alphas are the wrong way round. Oh, one other thing it could be is simply that the texture file has an alpha channel. Open it up in a bitmap editor and try to view alpha channel / load mask.-----You've probably tried all these things already. I don't know too much about this stuff, but since you've had no replies...;);  Also, how does it look if you try:pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_INVSRCCOLOR);pd3dDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_SRCCOLOR);;  When i trythispd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_INVSRCCOLOR);pd3dDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_SRCCOLOR);In the beggining it's looks like working but it's not.I mean one side of the mesh is transparent like i want but the other side is opaque.