From 4aad62006259c20bcdda1495138f7313b8f35e8d Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 22 Feb 2019 14:50:03 -0800 Subject: 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. --- indra/newview/pipeline.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/pipeline.cpp') 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(); -- cgit v1.2.3