summaryrefslogtreecommitdiff
path: root/indra/newview/llwlparamset.cpp
diff options
context:
space:
mode:
authorGeenz <geenz@geenzo.com>2013-01-11 06:37:21 -0500
committerGeenz <geenz@geenzo.com>2013-01-11 06:37:21 -0500
commiteda11a25a465dd87b187f63da661f2ce02925deb (patch)
treee77e33b4ee7b6f18f314576948be1560c3640ce9 /indra/newview/llwlparamset.cpp
parente8f6734d67ce1f61c5745bc1b25a9e5d1d599aca (diff)
Initial (largely complete) gamma correct rendering implementation.
Diffstat (limited to 'indra/newview/llwlparamset.cpp')
-rw-r--r--indra/newview/llwlparamset.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index b04d30db55..0b5e0235ee 100644
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -33,6 +33,7 @@
#include "llglslshader.h"
#include "lluictrlfactory.h"
#include "llsliderctrl.h"
+#include "pipeline.h"
#include <llgl.h>
@@ -127,6 +128,13 @@ void LLWLParamSet::update(LLGLSLShader * shader) const
}
}
}
+
+ if (LLPipeline::sRenderDeferred && !LLPipeline::sReflectionRender)
+ {
+ shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2);
+ } else {
+ shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 1.0);
+ }
}
void LLWLParamSet::set(const std::string& paramName, float x)