mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-22 13:53:55 +00:00
Revert "Prevent accidental culling of first person meshes"
This reverts commit c38bf6757a
.
This commit is contained in:
parent
8f4125134f
commit
586ac2d12d
1 changed files with 0 additions and 22 deletions
|
@ -369,21 +369,6 @@ private:
|
|||
float mFov;
|
||||
};
|
||||
|
||||
// Disable culling for all child nodes
|
||||
class DisableCullingVisitor : public osg::NodeVisitor
|
||||
{
|
||||
public:
|
||||
DisableCullingVisitor() : NodeVisitor(NodeVisitor::TRAVERSE_ACTIVE_CHILDREN) {};
|
||||
|
||||
virtual ~DisableCullingVisitor() {};
|
||||
|
||||
virtual void apply(osg::Node &node) override
|
||||
{
|
||||
node.setCullingActive(false);
|
||||
traverse(node);
|
||||
};
|
||||
};
|
||||
|
||||
void NpcAnimation::setRenderBin()
|
||||
{
|
||||
if (mViewMode == VM_FirstPerson)
|
||||
|
@ -672,13 +657,6 @@ void NpcAnimation::updateParts()
|
|||
|
||||
if (mAlpha != 1.f)
|
||||
mResourceSystem->getSceneManager()->recreateShaders(mObjectRoot);
|
||||
|
||||
if (mViewMode == VM_FirstPerson)
|
||||
{
|
||||
// Shadows made first-person meshes get erroneously culled. This stops that.
|
||||
DisableCullingVisitor disableCullingVisitor;
|
||||
mObjectRoot->accept(disableCullingVisitor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue