Remove incorrect implementation of "Clouds Maximum Percent" weather setting

sceneinput
scrawl 10 years ago
parent 52dbb24bb9
commit 56b7196bea

@ -605,7 +605,6 @@ SkyManager::SkyManager(osg::Group* parentNode, Resource::SceneManager* sceneMana
, mClouds()
, mNextClouds()
, mCloudBlendFactor(0.0f)
, mCloudOpacity(0.0f)
, mCloudSpeed(0.0f)
, mStarsOpacity(0.0f)
, mRemainingTransitionTime(0.0f)
@ -666,12 +665,15 @@ void SkyManager::create()
ModVertexAlphaVisitor modClouds(1);
mCloudMesh->accept(modClouds);
mCloudUpdater = new CloudUpdater;
mCloudUpdater->setOpacity(1.f);
mCloudMesh->addUpdateCallback(mCloudUpdater);
mCloudMesh2 = mSceneManager->createInstance("meshes/sky_clouds_01.nif", mCloudNode);
mCloudMesh2->accept(modClouds);
mCloudUpdater2 = new CloudUpdater;
mCloudUpdater2->setOpacity(0.f);
mCloudMesh2->addUpdateCallback(mCloudUpdater2);
mCloudMesh2->setNodeMask(0);
osg::ref_ptr<osg::Depth> depth = new osg::Depth;
depth->setWriteMask(false);
@ -1060,14 +1062,12 @@ void SkyManager::setWeather(const WeatherResult& weather)
osg::Texture::REPEAT, osg::Texture::REPEAT));
}
if (mCloudBlendFactor != weather.mCloudBlendFactor
|| mCloudOpacity != weather.mCloudOpacity)
if (mCloudBlendFactor != weather.mCloudBlendFactor)
{
mCloudBlendFactor = weather.mCloudBlendFactor;
mCloudOpacity = weather.mCloudOpacity;
mCloudUpdater->setOpacity(mCloudOpacity * (1.f-mCloudBlendFactor));
mCloudUpdater2->setOpacity(mCloudOpacity * mCloudBlendFactor);
mCloudUpdater->setOpacity((1.f-mCloudBlendFactor));
mCloudUpdater2->setOpacity(mCloudBlendFactor);
mCloudMesh2->setNodeMask(mCloudBlendFactor > 0.f ? ~0 : 0);
}

@ -58,8 +58,6 @@ namespace MWRender
float mCloudSpeed;
float mCloudOpacity;
float mGlareView;
bool mNight; // use night skybox
@ -204,7 +202,6 @@ namespace MWRender
std::string mClouds;
std::string mNextClouds;
float mCloudBlendFactor;
float mCloudOpacity;
float mCloudSpeed;
float mStarsOpacity;
osg::Vec4f mCloudColour;

@ -374,7 +374,6 @@ void WeatherManager::setResult(const std::string& weatherType)
mResult.mCloudTexture = current.mCloudTexture;
mResult.mCloudBlendFactor = 0;
mResult.mCloudOpacity = current.mCloudsMaximumPercent;
mResult.mWindSpeed = current.mWindSpeed;
mResult.mCloudSpeed = current.mCloudSpeed;
mResult.mGlareView = current.mGlareView;
@ -478,7 +477,6 @@ void WeatherManager::transition(float factor)
mResult.mNextCloudTexture = other.mCloudTexture;
mResult.mCloudBlendFactor = factor;
mResult.mCloudOpacity = lerp(current.mCloudOpacity, other.mCloudOpacity, factor);
mResult.mFogColor = lerp(current.mFogColor, other.mFogColor, factor);
mResult.mSunColor = lerp(current.mSunColor, other.mSunColor, factor);
mResult.mSkyColor = lerp(current.mSkyColor, other.mSkyColor, factor);
@ -488,7 +486,6 @@ void WeatherManager::transition(float factor)
mResult.mFogDepth = lerp(current.mFogDepth, other.mFogDepth, factor);
mResult.mWindSpeed = lerp(current.mWindSpeed, other.mWindSpeed, factor);
mResult.mCloudSpeed = lerp(current.mCloudSpeed, other.mCloudSpeed, factor);
mResult.mCloudOpacity = lerp(current.mCloudOpacity, other.mCloudOpacity, factor);
mResult.mGlareView = lerp(current.mGlareView, other.mGlareView, factor);
mResult.mNightFade = lerp(current.mNightFade, other.mNightFade, factor);

@ -77,7 +77,7 @@ namespace MWWorld
// Cloud animation speed multiplier
float mCloudSpeed;
// Multiplier for clouds transparency
// TODO: What is this supposed to do?
float mCloudsMaximumPercent;
// Value between 0 and 1, defines the strength of the sun glare effect.

Loading…
Cancel
Save