summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolwlsky.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-06-11 17:46:16 +0100
committerGraham Linden <graham@lindenlab.com>2018-06-11 17:46:16 +0100
commita0598b12656cdcf22ba95cacd01b5ff36f8f1b26 (patch)
tree3ea09c4043c27998ac26181d80c4d41f8ef87f35 /indra/newview/lldrawpoolwlsky.cpp
parent507c4921826e73635f6ae31087ab0e6cd1280f43 (diff)
Fix water fog consolidation in underwater shaders.
Add plumbing facilities to allow current and next moon textures to be passed to moon shader. Modify moon shader to blend between current and next moon textures by blend factor.
Diffstat (limited to 'indra/newview/lldrawpoolwlsky.cpp')
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 7a7739da03..3e74b06a7f 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -338,6 +338,8 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
moon_shader->bind();
moon_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV);
moon_shader->uniform3fv(LLShaderMgr::GLOW_LUM_WEIGHTS, 1, LLPipeline::RenderGlowLumWeights.mV);
+ F32 blend_factor = LLEnvironment::instance().getCurrentSky()->getBlendFactor();
+ moon_shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor);
}
LLFacePool::LLOverrideFaceColor color_override(this, color);
@@ -388,10 +390,11 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]);
gDeferredStarProgram.bind();
- // *NOTE: have to bind a texture here since register combiners blending in
+ // *NOTE: have to bind moon textures here since register combiners blending in
// renderStars() requires something to be bound and we might as well only
- // bind the moon's texture once.
- gGL.getTexUnit(0)->bind(gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture());
+ // bind the moon textures once.
+ gGL.getTexUnit(0)->bind(gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture(LLRender::DIFFUSE_MAP));
+ gGL.getTexUnit(1)->bind(gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture(LLRender::ALTERNATE_DIFFUSE_MAP));
renderHeavenlyBodies();