diff options
author | Graham Linden <graham@lindenlab.com> | 2018-10-30 00:46:28 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-10-30 00:46:28 +0100 |
commit | 769be699a960610b3804392ad98c31870c642547 (patch) | |
tree | c2b9e559a25bd56ef34067e093b70866ce24829b | |
parent | f334453af1cb2e7085cbe72da4fee357afceb80f (diff) |
SL-9766 Move up blend_factor init so we can override if we're short of blendable noise maps.
-rw-r--r-- | indra/newview/lldrawpoolwlsky.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index d8042a4125..d6b062f5f6 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -413,7 +413,9 @@ void LLDrawPoolWLSky::renderSkyCloudsAdvanced(const LLVector3& camPosLocal, F32 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE); - F32 blend_factor = 0.; + F32 cloud_variance = psky ? psky->getCloudVariance() : 0.0f; + F32 blend_factor = psky ? psky->getBlendFactor() : 0.0f; + // if we even have sun disc textures to work with... if (cloud_noise || cloud_noise_next) { @@ -440,9 +442,6 @@ void LLDrawPoolWLSky::renderSkyCloudsAdvanced(const LLVector3& camPosLocal, F32 cloudshader->bindTexture(LLShaderMgr::SINGLE_MIE_SCATTER_TEX, gAtmosphere->getMieScattering()); cloudshader->bindTexture(LLShaderMgr::ILLUMINANCE_TEX, gAtmosphere->getIlluminance()); - F32 blend_factor = psky ? psky->getBlendFactor() : 0.0f; - F32 cloud_variance = psky ? psky->getCloudVariance() : 0.0f; - LLVector3 sun_dir = LLEnvironment::instance().getSunDirection(); LLVector3 moon_dir = LLEnvironment::instance().getMoonDirection(); |