mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 21:45: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)
|
||||
{
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue