diff --git a/CHANGELOG.md b/CHANGELOG.md index 97415f1bbe..db5cc57e33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ Bug #7054: Quests aren't sorted by name Bug #7084: Resurrecting an actor doesn't take into account base record changes Bug #7088: Deleting last save game of last character doesn't clear character name/details + Feature #5492: Let rain and snow collide with statics Feature #6447: Add LOD support to Object Paging Feature #6933: Support high-resolution cursor textures Feature #6945: Support S3TC-compressed and BGR/BGRA NiPixelData @@ -220,7 +221,6 @@ Feature #5198: Implement "Magic effect expired" event Feature #5454: Clear active spells from actor when he disappears from scene Feature #5489: MCP: Telekinesis fix for activators - Feature #5492: Let rain and snow collide with statics Feature #5701: Convert osgAnimation::RigGeometry to double-buffered custom version Feature #5737: OpenMW-CS: Handle instance move from one cell to another Feature #5928: Allow Glow in the Dahrk to be disabled diff --git a/apps/openmw/mwrender/precipitationocclusion.cpp b/apps/openmw/mwrender/precipitationocclusion.cpp index 40eddea270..2faa4a693b 100644 --- a/apps/openmw/mwrender/precipitationocclusion.cpp +++ b/apps/openmw/mwrender/precipitationocclusion.cpp @@ -113,6 +113,8 @@ namespace MWRender mCamera->setViewport(0, 0, rttSize, rttSize); mCamera->attach(osg::Camera::DEPTH_BUFFER, mDepthTexture); mCamera->addChild(mSceneNode); + mCamera->setSmallFeatureCullingPixelSize( + Settings::Manager::getFloat("weather particle occlusion small feature culling pixel size", "Shaders")); SceneUtil::setCameraClearDepth(mCamera); } diff --git a/apps/openmw/mwrender/sky.cpp b/apps/openmw/mwrender/sky.cpp index dd45a8d560..d8b17340b6 100644 --- a/apps/openmw/mwrender/sky.cpp +++ b/apps/openmw/mwrender/sky.cpp @@ -291,6 +291,7 @@ namespace MWRender mRootNode->addChild(mEarlyRenderBinRoot); mUnderwaterSwitch = new UnderwaterSwitchCallback(skyroot); + mPrecipitationOcclusion = Settings::Manager::getBool("weather particle occlusion", "Shaders"); mPrecipitationOccluder = std::make_unique(skyroot, parentNode, rootNode, camera); } @@ -468,7 +469,8 @@ namespace MWRender mSceneManager->recreateShaders(mRainNode); mRootNode->addChild(mRainNode); - mPrecipitationOccluder->enable(); + if (mPrecipitationOcclusion) + mPrecipitationOccluder->enable(); } void SkyManager::destroyRain() @@ -727,7 +729,7 @@ namespace MWRender mSceneManager->recreateShaders(mParticleNode); - if (mCurrentParticleEffect == "meshes\\snow.nif") + if (mPrecipitationOcclusion && mCurrentParticleEffect == "meshes\\snow.nif") { mPrecipitationOccluder->enable(); mPrecipitationOccluder->updateRange(defaultWrapRange); diff --git a/apps/openmw/mwrender/sky.hpp b/apps/openmw/mwrender/sky.hpp index 16cc0df7bd..140bd9365f 100644 --- a/apps/openmw/mwrender/sky.hpp +++ b/apps/openmw/mwrender/sky.hpp @@ -151,6 +151,7 @@ namespace MWRender osg::ref_ptr mCounter; osg::ref_ptr mRainShooter; + bool mPrecipitationOcclusion = false; std::unique_ptr mPrecipitationOccluder; bool mCreated; diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 0981ecacc0..e052aefcf2 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -502,6 +502,8 @@ soft particles = false # Rain and snow particle occlusion weather particle occlusion = false +weather particle occlusion small feature culling pixel size = 4.0 + [Input] # Capture control of the cursor prevent movement outside the window.