summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp9
-rw-r--r--indra/newview/pipeline.cpp3
3 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index d30657a30a..214b1a1965 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -9055,7 +9055,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>-0.008</real>
+ <real>-0.004</real>
</map>
<key>RenderShadowOffset</key>
<map>
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 2ae361eb4d..ea59fd7825 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -91,6 +91,10 @@ void LLDrawPoolWLSky::beginRenderPass( S32 pass )
void LLDrawPoolWLSky::endRenderPass( S32 pass )
{
+ sky_shader = nullptr;
+ cloud_shader = nullptr;
+ sun_shader = nullptr;
+ moon_shader = nullptr;
}
void LLDrawPoolWLSky::beginDeferredPass(S32 pass)
@@ -111,7 +115,10 @@ void LLDrawPoolWLSky::beginDeferredPass(S32 pass)
void LLDrawPoolWLSky::endDeferredPass(S32 pass)
{
-
+ sky_shader = nullptr;
+ cloud_shader = nullptr;
+ sun_shader = nullptr;
+ moon_shader = nullptr;
}
void LLDrawPoolWLSky::renderFsSky(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader * shader) const
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index c33903dff9..bfb7eb3f6a 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8378,11 +8378,12 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
//F32 shadow_offset_error = 1.f + RenderShadowOffsetError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
F32 shadow_bias_error = RenderShadowBiasError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2])/3000.f;
+ F32 shadow_bias = RenderShadowBias + shadow_bias_error;
shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
shader.uniform1f(LLShaderMgr::DEFERRED_NEAR_CLIP, LLViewerCamera::getInstance()->getNear()*2.f);
shader.uniform1f (LLShaderMgr::DEFERRED_SHADOW_OFFSET, RenderShadowOffset); //*shadow_offset_error);
- shader.uniform1f(LLShaderMgr::DEFERRED_SHADOW_BIAS, RenderShadowBias+shadow_bias_error);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SHADOW_BIAS, shadow_bias);
shader.uniform1f(LLShaderMgr::DEFERRED_SPOT_SHADOW_OFFSET, RenderSpotShadowOffset);
shader.uniform1f(LLShaderMgr::DEFERRED_SPOT_SHADOW_BIAS, RenderSpotShadowBias);