Jump to content
  • Advertisement
Sign in to follow this  

Another question for incoherent material displayed against the original model

This topic is 2570 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

I just spend some time on going back to the fixed pipeline because of the deadline of the project.
I'd like to know why the materials would not look exactly the same as the original model exported.
I have a character model which has a blue upper body and a yellow pant.
Direct3D would display it as entirely yellow. Here is another code snippet/snapshot.

m_pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, true );
m_pDevice->SetRenderState( D3DRS_ALPHATESTENABLE, true );

m_pDevice->SetRenderState( D3DRS_SRCBLEND , D3DBLEND_SRCALPHA );
m_pDevice->SetRenderState(D3DRS_ZENABLE, true);
m_pDevice->SetRenderState(D3DRS_ZWRITEENABLE, true);
m_pDevice->SetRenderState(D3DRS_AMBIENT, D3DCOLOR_COLORVALUE(0.5, 0.5, 0.5, 1.0));

m_pDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW);

// normalize since objects are being scaled therefore normals aren't correct anymore
m_pDevice->SetRenderState(D3DRS_NORMALIZENORMALS, true);

m_pDevice->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
m_pDevice->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
m_pDevice->SetSamplerState( 0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR );
m_pDevice->SetRenderState(D3DRS_LIGHTING, true);

m_pDevice->LightEnable(DIRECTIONAL, true);


std::vector<COperator>::iterator it, itEnd = pDoc->m_OperatorObj.end();
for (it = pDoc->m_OperatorObj.begin(); it != itEnd; it++) {

I probed the materials values just right before drawsubset was called, I found the values to be correct.
Any ideas why the difference might occur?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!