diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-27 21:53:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-27 21:53:41 +0400 |
commit | dc664e3925d97f1a8bef8c85d5a47941e0866ad4 (patch) | |
tree | 27701d5344e6e790bc9b718f178ab623c93079a1 /source/gameengine/Rasterizer/RAS_TexVert.cpp | |
parent | 352eaccd5d991ad8966d686ae0954c7a0b03345c (diff) |
TexVert sharing was disabled for flat faces, this is silly since a building or any other model with flat faces will often be able to share texverts.
Simple testcase with a subdivided cube used 1/3 as many texverts and spend half as much time in the rasterizer while profiling.
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_TexVert.cpp')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_TexVert.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/gameengine/Rasterizer/RAS_TexVert.cpp b/source/gameengine/Rasterizer/RAS_TexVert.cpp index 60b00be5705..8eee24ac7f0 100644 --- a/source/gameengine/Rasterizer/RAS_TexVert.cpp +++ b/source/gameengine/Rasterizer/RAS_TexVert.cpp @@ -117,7 +117,9 @@ void RAS_TexVert::SetTangent(const MT_Vector3& tangent) // compare two vertices, and return TRUE if both are almost identical (they can be shared) bool RAS_TexVert::closeTo(const RAS_TexVert* other) { - return (m_flag == other->m_flag && + return ( + /* m_flag == other->m_flag && */ + /* at the moment the face only stores the smooth/flat setting so dont bother comparing it */ m_rgba == other->m_rgba && MT_fuzzyEqual(MT_Vector3(m_normal), MT_Vector3(other->m_normal)) && MT_fuzzyEqual(MT_Vector3(m_tangent), MT_Vector3(other->m_tangent)) && |