diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader.cpp b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader.cpp index aaae5cc904..ed291aeb48 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexLoader.cpp @@ -198,9 +198,12 @@ void VertexLoader::Setup() SetupColor(i,col[i], m_VtxAttr.color[i].Comp, m_VtxAttr.color[i].Elements); // TextureCoord + // Since m_VtxDesc.Text7Coord is broken across a 32 bit word boundary, retrieve its value manually. + // If we didn't do this, the vertex format would be read as one bit offset from where it should be, making + // 01 become 00, and 10/11 become 01 int tc[8] = { m_VtxDesc.Tex0Coord, m_VtxDesc.Tex1Coord, m_VtxDesc.Tex2Coord, m_VtxDesc.Tex3Coord, - m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, m_VtxDesc.Tex7Coord, + m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, (m_VtxDesc.Hex >> 31) & 3 }; for (int i = 0; i < 8; i++) SetupTexCoord(i, tc[i], diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp index 4ff74ae6cf..61b5cb35c9 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp @@ -187,9 +187,12 @@ int VertexLoader::ComputeVertexSize() } // TextureCoord + // Since m_VtxDesc.Text7Coord is broken across a 32 bit word boundary, retrieve its value manually. + // If we didn't do this, the vertex format would be read as one bit offset from where it should be, making + // 01 become 00, and 10/11 become 01 int tc[8] = { m_VtxDesc.Tex0Coord, m_VtxDesc.Tex1Coord, m_VtxDesc.Tex2Coord, m_VtxDesc.Tex3Coord, - m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, m_VtxDesc.Tex7Coord, + m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, (m_VtxDesc.Hex >> 31) & 3 }; for (int i = 0; i < 8; i++) {