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:
parent
d88d006984
commit
b9911da4c7
@ -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…
x
Reference in New Issue
Block a user