From 769be699a960610b3804392ad98c31870c642547 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 30 Oct 2018 00:46:28 +0100 Subject: SL-9766 Move up blend_factor init so we can override if we're short of blendable noise maps. --- indra/newview/lldrawpoolwlsky.cpp | 7 +++---- 1 file 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(); -- cgit v1.2.3