diff --git a/include/osg/CullStack b/include/osg/CullStack index fbb9bf375..c59ec9787 100644 --- a/include/osg/CullStack +++ b/include/osg/CullStack @@ -109,7 +109,15 @@ class OSG_EXPORT CullStack : public osg::CullSettings inline bool isCulled(const osg::Node& node) { - return node.isCullingActive() && getCurrentCullingSet().isCulled(node.getBound()); + if (node.isCullingActive()) + { + return getCurrentCullingSet().isCulled(node.getBound()); + } + else + { + getCurrentCullingSet().resetCullingMask(); + return false; + } } inline void pushCurrentMask() diff --git a/include/osg/CullingSet b/include/osg/CullingSet index 7847f0801..a22b99c35 100644 --- a/include/osg/CullingSet +++ b/include/osg/CullingSet @@ -326,6 +326,11 @@ class OSG_EXPORT CullingSet : public Referenced #endif } + inline void resetCullingMask() + { + _frustum.setResultMask(_frustum.getCurrentMask()); + } + void disableAndPushOccludersCurrentMask(NodePath& nodePath); void popOccludersCurrentMask(NodePath& nodePath);