mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-02 04:45:32 +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;
|
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()
|
void NpcAnimation::setRenderBin()
|
||||||
{
|
{
|
||||||
if (mViewMode == VM_FirstPerson)
|
if (mViewMode == VM_FirstPerson)
|
||||||
|
@ -672,13 +657,6 @@ void NpcAnimation::updateParts()
|
||||||
|
|
||||||
if (mAlpha != 1.f)
|
if (mAlpha != 1.f)
|
||||||
mResourceSystem->getSceneManager()->recreateShaders(mObjectRoot);
|
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