From 4aa40d16bcd32349cf629d718438447a3e026a41 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 20 Feb 2017 21:38:14 +0100 Subject: [PATCH] Increase the importance of light radius when sorting lights (Bug #2759) --- components/sceneutil/lightmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/sceneutil/lightmanager.cpp b/components/sceneutil/lightmanager.cpp index ee640d6cc..bd8ef8af4 100644 --- a/components/sceneutil/lightmanager.cpp +++ b/components/sceneutil/lightmanager.cpp @@ -374,7 +374,7 @@ namespace SceneUtil bool sortLights (const LightManager::LightSourceViewBound* left, const LightManager::LightSourceViewBound* right) { - return left->mViewBound.center().length2() - left->mViewBound.radius2()/4.f < right->mViewBound.center().length2() - right->mViewBound.radius2()/4.f; + return left->mViewBound.center().length2() - left->mViewBound.radius2()*81 < right->mViewBound.center().length2() - right->mViewBound.radius2()*81; } void LightListCallback::operator()(osg::Node *node, osg::NodeVisitor *nv)