From 46131fbcd4b36fe6202299f3e584b0704eb13beb Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 14 Aug 2008 17:12:40 +0000 Subject: Apricot branch: a fix for flickering alpha, with multi-material objects. Note that sorting is only between polygons with the same material, so which material draws first is still arbitrary, but consistent. --- source/gameengine/Rasterizer/RAS_BucketManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gameengine/Rasterizer/RAS_BucketManager.cpp b/source/gameengine/Rasterizer/RAS_BucketManager.cpp index e6732d355dc..bbddf3e6155 100644 --- a/source/gameengine/Rasterizer/RAS_BucketManager.cpp +++ b/source/gameengine/Rasterizer/RAS_BucketManager.cpp @@ -69,7 +69,7 @@ struct RAS_BucketManager::backtofront { bool operator()(const sortedmeshslot &a, const sortedmeshslot &b) { - return a.m_z < b.m_z; + return (a.m_z < b.m_z) || (a.m_z == b.m_z && a.m_ms < b.m_ms); } }; @@ -77,7 +77,7 @@ struct RAS_BucketManager::fronttoback { bool operator()(const sortedmeshslot &a, const sortedmeshslot &b) { - return a.m_z > b.m_z; + return (a.m_z > b.m_z) || (a.m_z == b.m_z && a.m_ms > b.m_ms); } }; -- cgit v1.2.3