Jump to content
  • Advertisement
KellerHaus

3D D3D9 VertexBlending on HW_PROCESSING

This topic is 403 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys,

Microsoft decreased perfomance of software processing and its problem for my project. This change is from (win10 1607)
Im using vertex blending for bone animation but my device does not support index matrices (MaxVertexBlendMatrixIndex = 0) so I use for it SW_PROCCESING.
Is there some way how to make bone animation without SW_PROCESSING ?

 

 

Quote

    pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
    pDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
    pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_SOLID);
    pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE);
    pDevice->SetRenderState( D3DRS_NORMALIZENORMALS, TRUE);
    pDevice->SetRenderState( D3DRS_ZWRITEENABLE, TRUE );
    pDevice->SetRenderState( D3DRS_ZENABLE, TRUE );
    
    
    {                
        pD3d->SetTransform( D3DTS_WORLDMATRIX(0), &pBone[0]);
        for( int i=0; i<pAni->GetNodeCount(); i++)
            pD3d->SetTransform( D3DTS_WORLDMATRIX(i + 1), pBone[i + 1]);
    }
    
    
    pD3d->SetRenderState( D3DRS_VERTEXBLEND, D3DVBF_3WEIGHTS);
    pD3d->SetFVF(T3DFVF_LMESHVERTEX);
    
    
    
    pD3d->SetStreamSource( 0, pVB, 0, sizeof(LMESHVERTEX));
    pD3d->SetIndices(pIB);
    
    pD3d->SetRenderState( D3DRS_INDEXEDVERTEXBLENDENABLE, TRUE);
            pD3d->DrawIndexedPrimitive(
                D3DPT_TRIANGLELIST,
                dwBaseVectorIndex, 0,
                dwNumVerctor,
                dwStartVertorIndex,
                pMesh->dwCount / 3);
            
    pD3d->SetRenderState( D3DRS_INDEXEDVERTEXBLENDENABLE, FALSE);
    
    pD3d->SetRenderState( D3DRS_VERTEXBLEND, D3DVBF_DISABLE);
    pD3d->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
    pD3d->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
    pD3d->SetRenderState( D3DRS_BLENDOP, D3DBLENDOP_ADD);
    pD3d->SetRenderState( D3DRS_ALPHATESTENABLE, FALSE);
    pD3d->SetRenderState( D3DRS_ALPHAREF, 0x00000000);
    pD3d->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW);
    pD3d->SetRenderState( D3DRS_ZWRITEENABLE, TRUE);
    pD3d->SetRenderState( D3DRS_ZENABLE, TRUE);

 

Edited by KellerHaus

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!