summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolwlsky.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-10-30 00:46:28 +0100
committerGraham Linden <graham@lindenlab.com>2018-10-30 00:46:28 +0100
commit769be699a960610b3804392ad98c31870c642547 (patch)
treec2b9e559a25bd56ef34067e093b70866ce24829b /indra/newview/lldrawpoolwlsky.cpp
parentf334453af1cb2e7085cbe72da4fee357afceb80f (diff)
SL-9766 Move up blend_factor init so we can override if we're short of blendable noise maps.
Diffstat (limited to 'indra/newview/lldrawpoolwlsky.cpp')
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp7
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();