diff options
Diffstat (limited to 'indra/newview/lldrawpoolwlsky.cpp')
-rw-r--r-- | indra/newview/lldrawpoolwlsky.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 961d72c62e..d4e7f1600e 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -216,10 +216,11 @@ void LLDrawPoolWLSky::renderSkyHaze(const LLVector3& camPosLocal, F32 camHeightL if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY)) { + LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); LLGLSPipelineDepthTestSkyBox sky(true, false); sky_shader->bind(); sky_shader->uniform1i(LLShaderMgr::SUN_UP_FACTOR, 1); - sky_shader->uniform1f(LLShaderMgr::SUN_MOON_GLOW_FACTOR, 1.0f); + sky_shader->uniform1f(LLShaderMgr::SUN_MOON_GLOW_FACTOR, psky->getSunMoonGlowFactor()); renderDome(origin, camHeightLocal, sky_shader); sky_shader->unbind(); } @@ -531,8 +532,6 @@ void LLDrawPoolWLSky::renderHeavenlyBodies() } } - blend_factor = LLEnvironment::instance().getCurrentSky()->getBlendFactor(); - face = gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]; if (gSky.mVOSkyp->getMoon().getDraw() && face && face->getTexture(LLRender::DIFFUSE_MAP) && face->getGeomCount() && moon_shader) @@ -550,17 +549,17 @@ void LLDrawPoolWLSky::renderHeavenlyBodies() { // Bind current and next sun textures moon_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_a, LLTexUnit::TT_TEXTURE); - blend_factor = 0; + //blend_factor = 0; } else if (tex_b && !tex_a) { moon_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE); - blend_factor = 0; + //blend_factor = 0; } else if (tex_b != tex_a) { moon_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, tex_a, LLTexUnit::TT_TEXTURE); - moon_shader->bindTexture(LLShaderMgr::ALTERNATE_DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE); + //moon_shader->bindTexture(LLShaderMgr::ALTERNATE_DIFFUSE_MAP, tex_b, LLTexUnit::TT_TEXTURE); } LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); @@ -570,7 +569,8 @@ void LLDrawPoolWLSky::renderHeavenlyBodies() moon_shader->uniform1f(LLShaderMgr::MOON_BRIGHTNESS, moon_brightness); moon_shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, gSky.mVOSkyp->getMoon().getColor().mV); moon_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV); - moon_shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); + //moon_shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); + moon_shader->uniform3fv(LLShaderMgr::DEFERRED_MOON_DIR, 1, psky->getMoonDirection().mV); // shader: moon_dir face->renderIndexed(); @@ -632,11 +632,6 @@ void LLDrawPoolWLSky::prerender() //LL_INFOS() << "wlsky prerendering pass." << LL_ENDL; } -LLDrawPoolWLSky *LLDrawPoolWLSky::instancePool() -{ - return new LLDrawPoolWLSky(); -} - LLViewerTexture* LLDrawPoolWLSky::getTexture() { return NULL; |