mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 10:23:56 +00:00
removed the far clip distance hack which is not needed anymore
This commit is contained in:
parent
b97b3d7b71
commit
34f796c38e
2 changed files with 0 additions and 19 deletions
|
@ -32,7 +32,6 @@ Water::Water (Ogre::Camera *camera, RenderingManager* rend, const ESM::Cell* cel
|
||||||
mIsUnderwater(false), mVisibilityFlags(0),
|
mIsUnderwater(false), mVisibilityFlags(0),
|
||||||
mReflectionTarget(0), mActive(1), mToggled(1),
|
mReflectionTarget(0), mActive(1), mToggled(1),
|
||||||
mReflectionRenderActive(false), mRendering(rend),
|
mReflectionRenderActive(false), mRendering(rend),
|
||||||
mOldFarClip(0), mOldFarClip2(0),
|
|
||||||
mWaterTimer(0.f)
|
mWaterTimer(0.f)
|
||||||
{
|
{
|
||||||
mSky = rend->getSkyManager();
|
mSky = rend->getSkyManager();
|
||||||
|
@ -267,34 +266,19 @@ void Water::renderQueueStarted (Ogre::uint8 queueGroupId, const Ogre::String &in
|
||||||
// We don't want the sky to get clipped by custom near clip plane (the water plane)
|
// We don't want the sky to get clipped by custom near clip plane (the water plane)
|
||||||
if (queueGroupId < 20 && mReflectionRenderActive)
|
if (queueGroupId < 20 && mReflectionRenderActive)
|
||||||
{
|
{
|
||||||
mOldFarClip = mReflectionCamera->getFarClipDistance ();
|
|
||||||
mReflectionCamera->disableCustomNearClipPlane();
|
mReflectionCamera->disableCustomNearClipPlane();
|
||||||
mReflectionCamera->setFarClipDistance (1000000000);
|
|
||||||
Root::getSingleton().getRenderSystem()->_setProjectionMatrix(mReflectionCamera->getProjectionMatrixRS());
|
Root::getSingleton().getRenderSystem()->_setProjectionMatrix(mReflectionCamera->getProjectionMatrixRS());
|
||||||
}
|
}
|
||||||
else if (queueGroupId == RQG_UnderWater)
|
|
||||||
{/*
|
|
||||||
mOldFarClip2 = mCamera->getFarClipDistance ();
|
|
||||||
mCamera->setFarClipDistance (1000000000);
|
|
||||||
Root::getSingleton().getRenderSystem()->_setProjectionMatrix(mCamera->getProjectionMatrixRS());
|
|
||||||
*/}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Water::renderQueueEnded (Ogre::uint8 queueGroupId, const Ogre::String &invocation, bool &repeatThisInvocation)
|
void Water::renderQueueEnded (Ogre::uint8 queueGroupId, const Ogre::String &invocation, bool &repeatThisInvocation)
|
||||||
{
|
{
|
||||||
if (queueGroupId < 20 && mReflectionRenderActive)
|
if (queueGroupId < 20 && mReflectionRenderActive)
|
||||||
{
|
{
|
||||||
mReflectionCamera->setFarClipDistance (mOldFarClip);
|
|
||||||
if (!mIsUnderwater)
|
if (!mIsUnderwater)
|
||||||
mReflectionCamera->enableCustomNearClipPlane(mErrorPlane);
|
mReflectionCamera->enableCustomNearClipPlane(mErrorPlane);
|
||||||
Root::getSingleton().getRenderSystem()->_setProjectionMatrix(mReflectionCamera->getProjectionMatrixRS());
|
Root::getSingleton().getRenderSystem()->_setProjectionMatrix(mReflectionCamera->getProjectionMatrixRS());
|
||||||
}
|
}
|
||||||
if (queueGroupId == RQG_UnderWater)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
mCamera->setFarClipDistance (mOldFarClip2);
|
|
||||||
Root::getSingleton().getRenderSystem()->_setProjectionMatrix(mCamera->getProjectionMatrixRS());
|
|
||||||
*/}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Water::update(float dt)
|
void Water::update(float dt)
|
||||||
|
|
|
@ -50,9 +50,6 @@ namespace MWRender {
|
||||||
bool mToggled;
|
bool mToggled;
|
||||||
int mTop;
|
int mTop;
|
||||||
|
|
||||||
int mOldFarClip;
|
|
||||||
int mOldFarClip2;
|
|
||||||
|
|
||||||
float mWaterTimer;
|
float mWaterTimer;
|
||||||
|
|
||||||
bool mReflectionRenderActive;
|
bool mReflectionRenderActive;
|
||||||
|
|
Loading…
Reference in a new issue