|
|
|
@ -363,7 +363,7 @@ namespace MWRender
|
|
|
|
|
|| reverseZ
|
|
|
|
|
|| Stereo::getMultiview();
|
|
|
|
|
resourceSystem->getSceneManager()->setForceShaders(forceShaders);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// FIXME: calling dummy method because terrain needs to know whether lighting is clamped
|
|
|
|
|
resourceSystem->getSceneManager()->setClampLighting(Settings::Manager::getBool("clamp lighting", "Shaders"));
|
|
|
|
|
resourceSystem->getSceneManager()->setAutoUseNormalMaps(Settings::Manager::getBool("auto use object normal maps", "Shaders"));
|
|
|
|
@ -511,7 +511,7 @@ namespace MWRender
|
|
|
|
|
|
|
|
|
|
// water goes after terrain for correct waterculling order
|
|
|
|
|
mWater.reset(new Water(sceneRoot->getParent(0), sceneRoot, mResourceSystem, mViewer->getIncrementalCompileOperation(), resourcePath));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mCamera.reset(new Camera(mViewer->getCamera()));
|
|
|
|
|
|
|
|
|
|
mScreenshotManager.reset(new ScreenshotManager(viewer, mRootNode, sceneRoot, mResourceSystem, mWater.get()));
|
|
|
|
@ -1293,10 +1293,7 @@ namespace MWRender
|
|
|
|
|
}
|
|
|
|
|
else if (it->first == "Camera" && it->second == "viewing distance")
|
|
|
|
|
{
|
|
|
|
|
mViewDistance = Settings::Manager::getFloat("viewing distance", "Camera");
|
|
|
|
|
if(!Settings::Manager::getBool("use distant fog", "Fog"))
|
|
|
|
|
mStateUpdater->setFogEnd(mViewDistance);
|
|
|
|
|
updateProjection = true;
|
|
|
|
|
setViewDistance(Settings::Manager::getFloat("viewing distance", "Camera"));
|
|
|
|
|
}
|
|
|
|
|
else if (it->first == "General" && (it->second == "texture filter" ||
|
|
|
|
|
it->second == "texture mipmap" ||
|
|
|
|
@ -1346,9 +1343,17 @@ namespace MWRender
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
float RenderingManager::getNearClipDistance() const
|
|
|
|
|
void RenderingManager::setViewDistance(float distance, bool delay)
|
|
|
|
|
{
|
|
|
|
|
return mNearClip;
|
|
|
|
|
mViewDistance = distance;
|
|
|
|
|
|
|
|
|
|
if (delay)
|
|
|
|
|
{
|
|
|
|
|
mUpdateProjectionMatrix = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updateProjectionMatrix();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
float RenderingManager::getTerrainHeightAt(const osg::Vec3f &pos)
|
|
|
|
|