idreamlovey
07-24-2007, 08:56 AM
I am using 3 stages of textures for terrain rendering(splatting). And i want to do multitexturing stuff only for near distant not for far distant to improve the frame rate. In order to that Can i simply turn off the stage like as follows for far distant:-
pd3dDevice->SetTexture(1,NULL);
pd3dDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_DISABLE );
pd3dDevice->SetTextureStageState( 1, D3DTSS_ALPHAOP, D3DTOP_DISABLE );
pd3dDevice->SetTexture(2,NULL);
pd3dDevice->SetTextureStageState( 2, D3DTSS_COLOROP, D3DTOP_DISABLE );
pd3dDevice->SetTextureStageState( 2, D3DTSS_ALPHAOP, D3DTOP_DISABLE );
Is this a good practice or i have to render the far distant with one texture stage with different vertex buffer and near distant with 3 texture stages with different vertex buffer. I have only one large static Vertex buffer with three texture stages. And i am using Dynamic Index Buffer.
pd3dDevice->SetTexture(1,NULL);
pd3dDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_DISABLE );
pd3dDevice->SetTextureStageState( 1, D3DTSS_ALPHAOP, D3DTOP_DISABLE );
pd3dDevice->SetTexture(2,NULL);
pd3dDevice->SetTextureStageState( 2, D3DTSS_COLOROP, D3DTOP_DISABLE );
pd3dDevice->SetTextureStageState( 2, D3DTSS_ALPHAOP, D3DTOP_DISABLE );
Is this a good practice or i have to render the far distant with one texture stage with different vertex buffer and near distant with 3 texture stages with different vertex buffer. I have only one large static Vertex buffer with three texture stages. And i am using Dynamic Index Buffer.