summaryrefslogtreecommitdiff
path: root/indra/newview/llviewershadermgr.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-02-10 18:39:02 -0600
committerDave Parks <davep@lindenlab.com>2011-02-10 18:39:02 -0600
commit2111bb8eff0469647028a5a8102ee5201321ac10 (patch)
treeb12faf3f7d31a08ac380e533bf49a3036a3cb50a /indra/newview/llviewershadermgr.cpp
parent952c3eaaa8c78d00ef62932d46af1d8fa565e7b2 (diff)
SH-958 Fix for entire scene being in shadow when shadows + SSAO disabled but "Lighting and Shadows" enabled.
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r--indra/newview/llviewershadermgr.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 7c84357de8..a9462c9d50 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -1149,7 +1149,14 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredSoftenProgram.mShaderFiles.clear();
gDeferredSoftenProgram.mShaderFiles.push_back(make_pair("deferred/softenLightV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredSoftenProgram.mShaderFiles.push_back(make_pair("deferred/softenLightF.glsl", GL_FRAGMENT_SHADER_ARB));
+
gDeferredSoftenProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+
+ if (gSavedSettings.getBOOL("RenderDeferredSSAO"))
+ { //if using SSAO, take screen space light map into account as if shadows are enabled
+ gDeferredSoftenProgram.mShaderLevel = llmax(gDeferredSoftenProgram.mShaderLevel, 2);
+ }
+
success = gDeferredSoftenProgram.createShader(NULL, NULL);
}