Fixes to the occluder culling code to properly disable occluders to prevent

self occlusion.
This commit is contained in:
Robert Osfield
2002-06-17 09:10:26 +00:00
parent 156a9fbaea
commit 27412c27c9
10 changed files with 151 additions and 61 deletions

View File

@@ -548,12 +548,14 @@ void CullVisitor::apply(osg::OccluderNode& node)
{
// need to check if occlusion node is in the occluder
// list, if so disable the appropriate ShadowOccluderVolume
disableOccluder(_nodePath);
disableAndPushOccludersCurrentMask(_nodePath);
// std::cout<<"CullVisitor:: We are in an Occlusion node"<<&node<<std::endl;
if (isCulled(node)) return;
if (isCulled(node))
{
popOccludersCurrentMask(_nodePath);
return;
}
// push the culling mode.
pushCurrentMask();
@@ -571,6 +573,9 @@ void CullVisitor::apply(osg::OccluderNode& node)
// pop the culling mode.
popCurrentMask();
// pop the current mask for the disabled occluder
popOccludersCurrentMask(_nodePath);
}