summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-02-22 14:50:03 -0800
committerGraham Linden <graham@lindenlab.com>2019-02-22 14:50:03 -0800
commit4aad62006259c20bcdda1495138f7313b8f35e8d (patch)
treed6a011a2030535cb30c34e0e37f2b552d984ea90 /indra/newview/pipeline.cpp
parent9a66e4a9dec4ae6abbd9048c7cacd3480b513cbc (diff)
SL-10415, SL-10612, SL-10569
Fix shadow sampling min with caster dp and offset tweaks. Fix moon direction not being transformed as the sun dir is. Fix colorspace issue causing some objects to render grayish instead of blackish.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 490738d304..b6e35fb6ea 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8497,8 +8497,12 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
shader.uniform1f(LLShaderMgr::DEFERRED_DEPTH_CUTOFF, RenderEdgeDepthCutoff);
shader.uniform1f(LLShaderMgr::DEFERRED_NORM_CUTOFF, RenderEdgeNormCutoff);
+ shader.uniform4fv(LLShaderMgr::SUNLIGHT_COLOR, 1, mSunDiffuse.mV);
+ shader.uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, mMoonDiffuse.mV);
+
LLEnvironment& environment = LLEnvironment::instance();
shader.uniform1i(LLShaderMgr::SUN_UP_FACTOR, environment.getIsSunUp() ? 1 : 0);
+ shader.uniform1f(LLShaderMgr::SUN_MOON_GLOW_FACTOR, environment.getCurrentSky()->getSunMoonGlowFactor());
if (shader.getUniformLocation(LLShaderMgr::DEFERRED_NORM_MATRIX) >= 0)
{
@@ -8591,6 +8595,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target)
mTransformedSunDir.set(tc.v);
glh::vec4f tc_moon(mMoonDir.mV);
+ mat.mult_matrix_vec(tc_moon);
mTransformedMoonDir.set(tc_moon.v);
gGL.pushMatrix();