mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-02 16:36:41 +00:00
Merge branch 'occlusion_tweaks' into 'master'
Weather occlusion updates See merge request OpenMW/openmw!2595
This commit is contained in:
commit
c24f43ec32
5 changed files with 10 additions and 3 deletions
|
@ -31,6 +31,7 @@
|
||||||
Bug #7054: Quests aren't sorted by name
|
Bug #7054: Quests aren't sorted by name
|
||||||
Bug #7084: Resurrecting an actor doesn't take into account base record changes
|
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
|
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 #6447: Add LOD support to Object Paging
|
||||||
Feature #6933: Support high-resolution cursor textures
|
Feature #6933: Support high-resolution cursor textures
|
||||||
Feature #6945: Support S3TC-compressed and BGR/BGRA NiPixelData
|
Feature #6945: Support S3TC-compressed and BGR/BGRA NiPixelData
|
||||||
|
@ -220,7 +221,6 @@
|
||||||
Feature #5198: Implement "Magic effect expired" event
|
Feature #5198: Implement "Magic effect expired" event
|
||||||
Feature #5454: Clear active spells from actor when he disappears from scene
|
Feature #5454: Clear active spells from actor when he disappears from scene
|
||||||
Feature #5489: MCP: Telekinesis fix for activators
|
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 #5701: Convert osgAnimation::RigGeometry to double-buffered custom version
|
||||||
Feature #5737: OpenMW-CS: Handle instance move from one cell to another
|
Feature #5737: OpenMW-CS: Handle instance move from one cell to another
|
||||||
Feature #5928: Allow Glow in the Dahrk to be disabled
|
Feature #5928: Allow Glow in the Dahrk to be disabled
|
||||||
|
|
|
@ -113,6 +113,8 @@ namespace MWRender
|
||||||
mCamera->setViewport(0, 0, rttSize, rttSize);
|
mCamera->setViewport(0, 0, rttSize, rttSize);
|
||||||
mCamera->attach(osg::Camera::DEPTH_BUFFER, mDepthTexture);
|
mCamera->attach(osg::Camera::DEPTH_BUFFER, mDepthTexture);
|
||||||
mCamera->addChild(mSceneNode);
|
mCamera->addChild(mSceneNode);
|
||||||
|
mCamera->setSmallFeatureCullingPixelSize(
|
||||||
|
Settings::Manager::getFloat("weather particle occlusion small feature culling pixel size", "Shaders"));
|
||||||
|
|
||||||
SceneUtil::setCameraClearDepth(mCamera);
|
SceneUtil::setCameraClearDepth(mCamera);
|
||||||
}
|
}
|
||||||
|
|
|
@ -291,6 +291,7 @@ namespace MWRender
|
||||||
mRootNode->addChild(mEarlyRenderBinRoot);
|
mRootNode->addChild(mEarlyRenderBinRoot);
|
||||||
mUnderwaterSwitch = new UnderwaterSwitchCallback(skyroot);
|
mUnderwaterSwitch = new UnderwaterSwitchCallback(skyroot);
|
||||||
|
|
||||||
|
mPrecipitationOcclusion = Settings::Manager::getBool("weather particle occlusion", "Shaders");
|
||||||
mPrecipitationOccluder = std::make_unique<PrecipitationOccluder>(skyroot, parentNode, rootNode, camera);
|
mPrecipitationOccluder = std::make_unique<PrecipitationOccluder>(skyroot, parentNode, rootNode, camera);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -468,7 +469,8 @@ namespace MWRender
|
||||||
mSceneManager->recreateShaders(mRainNode);
|
mSceneManager->recreateShaders(mRainNode);
|
||||||
|
|
||||||
mRootNode->addChild(mRainNode);
|
mRootNode->addChild(mRainNode);
|
||||||
mPrecipitationOccluder->enable();
|
if (mPrecipitationOcclusion)
|
||||||
|
mPrecipitationOccluder->enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SkyManager::destroyRain()
|
void SkyManager::destroyRain()
|
||||||
|
@ -727,7 +729,7 @@ namespace MWRender
|
||||||
|
|
||||||
mSceneManager->recreateShaders(mParticleNode);
|
mSceneManager->recreateShaders(mParticleNode);
|
||||||
|
|
||||||
if (mCurrentParticleEffect == "meshes\\snow.nif")
|
if (mPrecipitationOcclusion && mCurrentParticleEffect == "meshes\\snow.nif")
|
||||||
{
|
{
|
||||||
mPrecipitationOccluder->enable();
|
mPrecipitationOccluder->enable();
|
||||||
mPrecipitationOccluder->updateRange(defaultWrapRange);
|
mPrecipitationOccluder->updateRange(defaultWrapRange);
|
||||||
|
|
|
@ -151,6 +151,7 @@ namespace MWRender
|
||||||
osg::ref_ptr<RainCounter> mCounter;
|
osg::ref_ptr<RainCounter> mCounter;
|
||||||
osg::ref_ptr<RainShooter> mRainShooter;
|
osg::ref_ptr<RainShooter> mRainShooter;
|
||||||
|
|
||||||
|
bool mPrecipitationOcclusion = false;
|
||||||
std::unique_ptr<PrecipitationOccluder> mPrecipitationOccluder;
|
std::unique_ptr<PrecipitationOccluder> mPrecipitationOccluder;
|
||||||
|
|
||||||
bool mCreated;
|
bool mCreated;
|
||||||
|
|
|
@ -502,6 +502,8 @@ soft particles = false
|
||||||
# Rain and snow particle occlusion
|
# Rain and snow particle occlusion
|
||||||
weather particle occlusion = false
|
weather particle occlusion = false
|
||||||
|
|
||||||
|
weather particle occlusion small feature culling pixel size = 4.0
|
||||||
|
|
||||||
[Input]
|
[Input]
|
||||||
|
|
||||||
# Capture control of the cursor prevent movement outside the window.
|
# Capture control of the cursor prevent movement outside the window.
|
||||||
|
|
Loading…
Reference in a new issue