mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04:00
Revert "Prevent accidental culling of first person meshes"
This reverts commit c38bf6757ad162bd69c1ba780bb690b7f3445f46.
This commit is contained in:
parent
8f4125134f
commit
586ac2d12d
@ -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…
x
Reference in New Issue
Block a user