Merge branch 'occlusion_tweaks' into 'master'

Weather occlusion updates

See merge request OpenMW/openmw!2595
7220-lua-add-a-general-purpose-lexical-parser
psi29a 2 years ago
commit c24f43ec32

@ -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

@ -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);
}

@ -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<PrecipitationOccluder>(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);

@ -151,6 +151,7 @@ namespace MWRender
osg::ref_ptr<RainCounter> mCounter;
osg::ref_ptr<RainShooter> mRainShooter;
bool mPrecipitationOcclusion = false;
std::unique_ptr<PrecipitationOccluder> mPrecipitationOccluder;
bool mCreated;

@ -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.

Loading…
Cancel
Save