mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Merge branch 'only_snow' into 'master'
Fix invisible weather effects See merge request OpenMW/openmw!2601
This commit is contained in:
commit
599f68029e
@ -703,6 +703,8 @@ namespace MWRender
|
||||
mParticleEffect->accept(findPSVisitor);
|
||||
|
||||
const osg::Vec3 defaultWrapRange = osg::Vec3(1024, 1024, 800);
|
||||
const bool occlusionEnabledForEffect
|
||||
= !mRainEffect.empty() || mCurrentParticleEffect == "meshes\\snow.nif";
|
||||
|
||||
for (unsigned int i = 0; i < findPSVisitor.mFoundNodes.size(); ++i)
|
||||
{
|
||||
@ -724,12 +726,14 @@ namespace MWRender
|
||||
}
|
||||
|
||||
ps->setUserValue("simpleLighting", true);
|
||||
ps->setUserValue("particleOcclusion", true);
|
||||
|
||||
if (occlusionEnabledForEffect)
|
||||
ps->setUserValue("particleOcclusion", true);
|
||||
}
|
||||
|
||||
mSceneManager->recreateShaders(mParticleNode);
|
||||
|
||||
if (mPrecipitationOcclusion && mCurrentParticleEffect == "meshes\\snow.nif")
|
||||
if (mPrecipitationOcclusion && occlusionEnabledForEffect)
|
||||
{
|
||||
mPrecipitationOccluder->enable();
|
||||
mPrecipitationOccluder->updateRange(defaultWrapRange);
|
||||
|
Loading…
x
Reference in New Issue
Block a user