I can see things behind the terrain surface as if texture is transparent.
I haven't loaded any transparent texture or used alpha blending or anything like that. Am loading a single texture from bmp file for whole terrain, treid other formats like jpg,tga,etc too.
I am implementing this in D3D9 Fixed funtion pipeline for now.
Here are my sampler & renderstates -
chd3d->pd3dDevice->SetSamplerState(0,D3DSAMP_MINFILTER,D3DTEXF_LINEAR); chd3d->pd3dDevice->SetSamplerState(0,D3DSAMP_MAGFILTER,D3DTEXF_LINEAR); chd3d->pd3dDevice->SetSamplerState(0,D3DSAMP_MIPFILTER,D3DTEXF_LINEAR); chd3d->pd3dDevice->SetRenderState(D3DRS_LIGHTING,false); chd3d->pd3dDevice->SetRenderState(D3DRS_ZENABLE,true); chd3d->pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,false); chd3d->pd3dDevice->SetTexture(0,texture->getTexture()); chd3d->pd3dDevice->SetTextureStageState(0,D3DTSS_COLORARG1,D3DTA_TEXTURE); chd3d->pd3dDevice->SetTextureStageState(0,D3DTSS_COLOROP,D3DTOP_SELECTARG1); chd3d->pd3dDevice->SetTextureStageState(0,D3DTSS_TEXCOORDINDEX,0); chd3d->pd3dDevice->SetTextureStageState(1,D3DTSS_COLOROP,D3DTOP_DISABLE); //disabling second texture till i fix this problem
Can anyone please tell me why these textures are being rendered in this weird manner ?
[Edited by - Chetanhl on September 28, 2010 3:36:12 PM]