Do special handling of texture coordinate generation if there is only a position and texture coordinate present.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4801 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
donkopunchstania
2010-01-11 00:44:40 +00:00
parent 175162e661
commit a19be73be3
5 changed files with 73 additions and 30 deletions

View File

@ -320,6 +320,13 @@ void VertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType)
}
}
// special case if only pos and tex coord 0 and tex coord input is AB11
m_TexGenSpecialCase =
((g_VtxDesc.Hex & 0x60600L) == g_VtxDesc.Hex) && // only pos and tex coord 0
(g_VtxDesc.Tex0Coord != NOT_PRESENT) &&
(xfregs.texMtxInfo[0].inputform == XF_TEXINPUT_AB11);
m_SetupUnit->Init(primitiveType);
}
@ -341,7 +348,7 @@ void VertexLoader::LoadVertex()
TransformUnit::TransformColor(&m_Vertex, outVertex);
TransformUnit::TransformTexCoord(&m_Vertex, outVertex);
TransformUnit::TransformTexCoord(&m_Vertex, outVertex, m_TexGenSpecialCase);
m_SetupUnit->SetupVertex();