diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index 09330b4a54..8b62daba4a 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -1361,10 +1361,10 @@ namespace MWRender if (mViewDistance < mNearClip) throw std::runtime_error("Viewing distance is less than near clip"); - const double width = Settings::video().mResolutionX; - const double height = Settings::video().mResolutionY; + const int width = Settings::video().mResolutionX; + const int height = Settings::video().mResolutionY; - double aspect = (height == 0.0) ? 1.0 : width / height; + double aspect = (height == 0) ? 1.0 : static_cast(width) / height; float fov = mFieldOfView; if (mFieldOfViewOverridden) fov = mFieldOfViewOverride; @@ -1389,7 +1389,7 @@ namespace MWRender } else { - mSharedUniformStateUpdater->setScreenRes(static_cast(width), static_cast(height)); + setScreenRes(width, height); } // Since our fog is not radial yet, we should take FOV in account, otherwise terrain near viewing distance may diff --git a/components/sceneutil/mwshadowtechnique.hpp b/components/sceneutil/mwshadowtechnique.hpp index 48b487649d..a2e811b95e 100644 --- a/components/sceneutil/mwshadowtechnique.hpp +++ b/components/sceneutil/mwshadowtechnique.hpp @@ -300,7 +300,7 @@ namespace SceneUtil { double _splitPointUniformLogRatio = 0.5; double _splitPointDeltaBias = 0.0; - float _polygonOffsetFactor = 1.f; + float _polygonOffsetFactor = 1.1f; float _polygonOffsetUnits = 4.0f; bool _useFrontFaceCulling = true;