summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolwlsky.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolwlsky.cpp')
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 309f535c39..2ff4edabe3 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -33,7 +33,6 @@
#include "pipeline.h"
#include "llviewercamera.h"
#include "llimage.h"
-#include "llwlparammanager.h"
#include "llviewershadermgr.h"
#include "llglslshader.h"
#include "llsky.h"
@@ -42,6 +41,8 @@
#include "llface.h"
#include "llrender.h"
+#include "llenvironment.h"
+
LLPointer<LLViewerTexture> LLDrawPoolWLSky::sCloudNoiseTexture = NULL;
LLPointer<LLImageRaw> LLDrawPoolWLSky::sCloudNoiseRawImage = NULL;
@@ -81,7 +82,8 @@ LLDrawPoolWLSky::LLDrawPoolWLSky(void) :
}
}
- LLWLParamManager::getInstance()->propagateParameters();
+ /* *LAPRAS */
+// LLWLParamManager::getInstance()->propagateParameters();
}
LLDrawPoolWLSky::~LLDrawPoolWLSky()
@@ -190,14 +192,14 @@ void LLDrawPoolWLSky::renderStars(void) const
// *NOTE: we divide by two here and GL_ALPHA_SCALE by two below to avoid
// clamping and allow the star_alpha param to brighten the stars.
- bool error;
LLColor4 star_alpha(LLColor4::black);
- star_alpha.mV[3] = LLWLParamManager::getInstance()->mCurParams.getFloat("star_brightness", error) / 2.f;
+ // *LAPRAS
+ star_alpha.mV[3] = LLEnvironment::instance().getCurrentSky()->getStarBrightness() / 2.f;
// If start_brightness is not set, exit
- if( error )
+ if( star_alpha.mV[3] < 0.001 )
{
- LL_WARNS() << "star_brightness missing in mCurParams" << LL_ENDL;
+ LL_DEBUGS("SKY") << "star_brightness below threshold." << LL_ENDL;
return;
}
@@ -310,7 +312,8 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
}
LL_RECORD_BLOCK_TIME(FTM_RENDER_WL_SKY);
- const F32 camHeightLocal = LLWLParamManager::getInstance()->getDomeOffset() * LLWLParamManager::getInstance()->getDomeRadius();
+
+ const F32 camHeightLocal = LLEnvironment::instance().getCamHeight();
LLGLSNoFog disableFog;
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
@@ -357,7 +360,7 @@ void LLDrawPoolWLSky::render(S32 pass)
}
LL_RECORD_BLOCK_TIME(FTM_RENDER_WL_SKY);
- const F32 camHeightLocal = LLWLParamManager::getInstance()->getDomeOffset() * LLWLParamManager::getInstance()->getDomeRadius();
+ const F32 camHeightLocal = LLEnvironment::instance().getCamHeight();
LLGLSNoFog disableFog;
LLGLDepthTest depth(GL_TRUE, GL_FALSE);