mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 22:15:32 +00:00
Take the radius of lights into account when sorting
This commit is contained in:
parent
bf9c62fa42
commit
631cec7304
1 changed files with 1 additions and 1 deletions
|
@ -244,7 +244,7 @@ namespace SceneUtil
|
||||||
|
|
||||||
bool sortLights (const LightManager::LightSourceTransform* left, const LightManager::LightSourceTransform* right)
|
bool sortLights (const LightManager::LightSourceTransform* left, const LightManager::LightSourceTransform* right)
|
||||||
{
|
{
|
||||||
return left->mViewBound.center().length2() < right->mViewBound.center().length2();
|
return left->mViewBound.center().length2() - left->mViewBound.radius2()/4.f < right->mViewBound.center().length2() - right->mViewBound.radius2()/4.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LightListCallback::operator()(osg::Node *node, osg::NodeVisitor *nv)
|
void LightListCallback::operator()(osg::Node *node, osg::NodeVisitor *nv)
|
||||||
|
|
Loading…
Reference in a new issue