mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 20:53:50 +00:00
fix shadowsglitch by bounds overflow
Signed-off-by: Bret Curtis <psi29a@gmail.com>
This commit is contained in:
parent
00e56ae862
commit
77b92aee9c
4 changed files with 4 additions and 11 deletions
|
@ -171,8 +171,6 @@ void QuadTreeNode::setBoundingBox(const osg::BoundingBox &boundingBox)
|
|||
{
|
||||
mBoundingBox = boundingBox;
|
||||
mValidBounds = boundingBox.valid();
|
||||
dirtyBound();
|
||||
getBound();
|
||||
}
|
||||
|
||||
const osg::BoundingBox &QuadTreeNode::getBoundingBox() const
|
||||
|
@ -180,11 +178,6 @@ const osg::BoundingBox &QuadTreeNode::getBoundingBox() const
|
|||
return mBoundingBox;
|
||||
}
|
||||
|
||||
osg::BoundingSphere QuadTreeNode::computeBound() const
|
||||
{
|
||||
return osg::BoundingSphere(mBoundingBox);
|
||||
}
|
||||
|
||||
float QuadTreeNode::getSize() const
|
||||
{
|
||||
return mSize;
|
||||
|
|
|
@ -91,8 +91,6 @@ namespace Terrain
|
|||
const osg::BoundingBox& getBoundingBox() const;
|
||||
bool hasValidBounds() const { return mValidBounds; }
|
||||
|
||||
virtual osg::BoundingSphere computeBound() const;
|
||||
|
||||
/// size in cell coordinates
|
||||
float getSize() const;
|
||||
|
||||
|
|
|
@ -140,6 +140,8 @@ public:
|
|||
addChildren(mRootNode);
|
||||
|
||||
mRootNode->initNeighbours();
|
||||
float cellWorldSize = mStorage->getCellWorldSize();
|
||||
mRootNode->setInitialBound(osg::BoundingSphere(osg::BoundingBox(osg::Vec3(mMinX*cellWorldSize, mMinY*cellWorldSize, 0), osg::Vec3(mMaxX*cellWorldSize, mMaxY*cellWorldSize, 0))));
|
||||
}
|
||||
|
||||
void addChildren(QuadTreeNode* parent)
|
||||
|
|
|
@ -826,8 +826,8 @@ enable debug hud = false
|
|||
# Enable the debug overlay to see where each shadow map affects.
|
||||
enable debug overlay = false
|
||||
|
||||
# Attempt to better use the shadow map by making them cover a smaller area. May have a minor to major performance impact.
|
||||
compute tight scene bounds = true
|
||||
# Attempt to better use the shadow map by making them cover a smaller area. May have a major performance impact.
|
||||
compute tight scene bounds = false
|
||||
|
||||
# How large to make the shadow map(s). Higher values increase GPU load, but can produce better-looking results. Power-of-two values may turn out to be faster on some GPU/driver combinations.
|
||||
shadow map resolution = 1024
|
||||
|
|
Loading…
Reference in a new issue