mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-22 17:53:53 +00:00
use camera-relative rendering to prevent precision artifacts when moving far from (0,0,0)
This commit is contained in:
parent
51a76eda92
commit
046ef39c4a
1 changed files with 4 additions and 0 deletions
|
@ -52,6 +52,10 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const
|
||||||
// Load resources
|
// Load resources
|
||||||
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
|
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
|
||||||
|
|
||||||
|
// Due to the huge world size of MW, we'll want camera-relative rendering.
|
||||||
|
// This prevents precision artifacts when moving very far from the origin.
|
||||||
|
mRendering.getScene()->setCameraRelativeRendering(true);
|
||||||
|
|
||||||
// disable unsupported effects
|
// disable unsupported effects
|
||||||
const RenderSystemCapabilities* caps = Root::getSingleton().getRenderSystem()->getCapabilities();
|
const RenderSystemCapabilities* caps = Root::getSingleton().getRenderSystem()->getCapabilities();
|
||||||
if (caps->getNumMultiRenderTargets() < 2 || !Settings::Manager::getBool("shaders", "Objects"))
|
if (caps->getNumMultiRenderTargets() < 2 || !Settings::Manager::getBool("shaders", "Objects"))
|
||||||
|
|
Loading…
Reference in a new issue