mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-06 19:01:21 +03: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:
parent
d88d006984
commit
b9911da4c7
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue