summaryrefslogtreecommitdiff
path: root/indra/newview/llviewershadermgr.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-03-19 18:14:17 -0500
committerDave Parks <davep@lindenlab.com>2010-03-19 18:14:17 -0500
commitbbfacbd50d6e8beac36fd8de1dc51ceb109a4a7d (patch)
tree172caf45aec0f278555043d3bcdfd70fd91deb15 /indra/newview/llviewershadermgr.cpp
parentd4699a1b0e922258682d9b6e164a5bcc6bbd7238 (diff)
RenderDeferredSSAO works as an independent setting -- decoupled shadows from SSAO.
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r--indra/newview/llviewershadermgr.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 5b7b464e91..50e5522174 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -973,10 +973,22 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
+ S32 level = 0;
+ std::string fragment;
+
+ if (gSavedSettings.getBOOL("RenderDeferredSSAO"))
+ {
+ fragment = "deferred/sunLightSSAOF.glsl";
+ }
+ else
+ {
+ fragment = "deferred/sunLightF.glsl";
+ }
+
gDeferredSunProgram.mName = "Deferred Sun Shader";
gDeferredSunProgram.mShaderFiles.clear();
gDeferredSunProgram.mShaderFiles.push_back(make_pair("deferred/sunLightV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredSunProgram.mShaderFiles.push_back(make_pair("deferred/sunLightF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredSunProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
gDeferredSunProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredSunProgram.createShader(NULL, NULL);
}