From 14b807e55efcfb8a9b52909fd554c9ba1cea0f36 Mon Sep 17 00:00:00 2001 From: Geenz Date: Thu, 18 Apr 2013 21:05:16 -0400 Subject: Don't apply gamma correction underwater (for now). --- indra/newview/pipeline.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c02a51ef59..ca5adc6180 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7124,7 +7124,17 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) mScreen.bindTexture(0,channel); gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT); } + gDeferredPostGammaCorrectProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, mScreen.getWidth(), mScreen.getHeight()); + + F32 gamma = 1.0; + if (!LLViewerCamera::getInstance()->cameraUnderWater()) + { + gamma = 1.0/2.2; + } + + gDeferredPostGammaCorrectProgram.uniform1f(LLShaderMgr::TEXTURE_GAMMA, gamma); + gGL.begin(LLRender::TRIANGLE_STRIP); gGL.texCoord2f(tc1.mV[0], tc1.mV[1]); gGL.vertex2f(-1,-1); -- cgit v1.2.3