summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoSoftware/Src/VertexLoader.cpp
diff options
context:
space:
mode:
authordonkopunchstania <donkopunchstania@gmail.com>2010-01-11 00:44:40 +0000
committerdonkopunchstania <donkopunchstania@gmail.com>2010-01-11 00:44:40 +0000
commita19be73be32b3117719b201fbfd9f909df1a65ed (patch)
tree9a399c9f4e6d37a983d9d01b7ad31d92c60040a3 /Source/Plugins/Plugin_VideoSoftware/Src/VertexLoader.cpp
parent175162e66170c0b66e152ddae7f8738facbe2f16 (diff)
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
Diffstat (limited to 'Source/Plugins/Plugin_VideoSoftware/Src/VertexLoader.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoSoftware/Src/VertexLoader.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/VertexLoader.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/VertexLoader.cpp
index 7a14969b78..ad8a850cb8 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/VertexLoader.cpp
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/VertexLoader.cpp
@@ -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();