forked from teamnwah/openmw-tes3coop
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),
|
||||
mReflectionTarget(0), mActive(1), mToggled(1),
|
||||
mReflectionRenderActive(false), mRendering(rend),
|
||||
mOldFarClip(0), mOldFarClip2(0),
|
||||
mWaterTimer(0.f)
|
||||
{
|
||||
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)
|
||||
if (queueGroupId < 20 && mReflectionRenderActive)
|
||||
{
|
||||
mOldFarClip = mReflectionCamera->getFarClipDistance ();
|
||||
mReflectionCamera->disableCustomNearClipPlane();
|
||||
mReflectionCamera->setFarClipDistance (1000000000);
|
||||
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)
|
||||
{
|
||||
if (queueGroupId < 20 && mReflectionRenderActive)
|
||||
{
|
||||
mReflectionCamera->setFarClipDistance (mOldFarClip);
|
||||
if (!mIsUnderwater)
|
||||
mReflectionCamera->enableCustomNearClipPlane(mErrorPlane);
|
||||
Root::getSingleton().getRenderSystem()->_setProjectionMatrix(mReflectionCamera->getProjectionMatrixRS());
|
||||
}
|
||||
if (queueGroupId == RQG_UnderWater)
|
||||
{
|
||||
/*
|
||||
mCamera->setFarClipDistance (mOldFarClip2);
|
||||
Root::getSingleton().getRenderSystem()->_setProjectionMatrix(mCamera->getProjectionMatrixRS());
|
||||
*/}
|
||||
}
|
||||
|
||||
void Water::update(float dt)
|
||||
|
|
|
@ -50,9 +50,6 @@ namespace MWRender {
|
|||
bool mToggled;
|
||||
int mTop;
|
||||
|
||||
int mOldFarClip;
|
||||
int mOldFarClip2;
|
||||
|
||||
float mWaterTimer;
|
||||
|
||||
bool mReflectionRenderActive;
|
||||
|
|
Loading…
Reference in a new issue