Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualHeadkaze

Posted 15 July 2013 - 06:09 PM

If I change my rendering code to the following the green is rendered correctly:
 
for (int i = 0; i < m_materials.Length; i++)
{
    m_materials[i].Diffuse = new Color4(1.0f, m_materials[i].Diffuse.Red, m_materials[i].Diffuse.Green, m_materials[i].Diffuse.Blue);
 
    device.Material = m_materials[i];
 
    device.SetTexture(0, m_textures[i]);
 
    m_mesh.DrawSubset(i);
}
Why does setting the diffuse's alpha to 1.0f (original was 0.0025f) render it correctly? Both DirectX's ModelView and XAnimator render it correctly without this line.

I have tried so many different settings including trying to copy the render states directly from XAnimator but to no avail. I'm sure it's something simple.

#1Headkaze

Posted 15 July 2013 - 06:06 PM

If I change my rendering code to the following the green is rendered correctly:

 

for (int i = 0; i < m_materials.Length; i++)
{
    m_materials[i].Diffuse = new Color4(1.0f, m_materials[i].Diffuse.Red, m_materials[i].Diffuse.Green, m_materials[i].Diffuse.Blue);
 
    device.Material = m_materials[i];
 
    device.SetTexture(0, m_textures[i]);
 
    m_mesh.DrawSubset(i);
}

PARTNERS