From dc664e3925d97f1a8bef8c85d5a47941e0866ad4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 27 Apr 2009 17:53:41 +0000 Subject: 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. --- source/gameengine/Rasterizer/RAS_MeshObject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/gameengine/Rasterizer/RAS_MeshObject.cpp') diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.cpp b/source/gameengine/Rasterizer/RAS_MeshObject.cpp index 5625b172913..278aa9c75e2 100644 --- a/source/gameengine/Rasterizer/RAS_MeshObject.cpp +++ b/source/gameengine/Rasterizer/RAS_MeshObject.cpp @@ -304,7 +304,7 @@ void RAS_MeshObject::AddVertex(RAS_Polygon *poly, int i, slot = mmat->m_baseslot; darray = slot->CurrentDisplayArray(); - if(!flat) { + { /* Shared Vertex! */ /* find vertices shared between faces, with the restriction * that they exist in the same display array, and have the * same uv coordinate etc */ @@ -332,7 +332,7 @@ void RAS_MeshObject::AddVertex(RAS_Polygon *poly, int i, slot->AddPolygonVertex(offset); poly->SetVertexOffset(i, offset); - if(!flat) { + { /* Shared Vertex! */ SharedVertex shared; shared.m_darray = darray; shared.m_offset = offset; -- cgit v1.2.3