1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-27 05:37:25 +00:00

applies lightMask (#3201)

With this PR we apply `lightMask` to a `Transform` node we create specifically for a light. This mask will allow us to stop traversing such nodes sooner and avoid costly processing associated with `Transform` nodes in the cull visitor.
This commit is contained in:
Bo Svensson 2021-10-31 12:03:42 +00:00 committed by GitHub
parent d88d006984
commit b9911da4c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,6 +79,7 @@ namespace SceneUtil
// PositionAttitudeTransform seems to be slightly faster than MatrixTransform
osg::ref_ptr<SceneUtil::PositionAttitudeTransform> trans(new SceneUtil::PositionAttitudeTransform);
trans->setPosition(computeBound.getBoundingBox().center());
trans->setNodeMask(lightMask);
node->addChild(trans);