summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolalpha.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolalpha.cpp')
-rw-r--r--indra/newview/lldrawpoolalpha.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index f8d2a9e942..7893caf3c0 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -138,12 +138,6 @@ static void prepare_alpha_shader(LLGLSLShader* shader, bool textureGamma, bool d
shader->uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2f);
}
- S32 channel = shader->enableTexture(LLShaderMgr::EXPOSURE_MAP);
- if (channel > -1)
- {
- gGL.getTexUnit(channel)->bind(&gPipeline.mExposureMap);
- }
-
//also prepare rigged variant
if (shader->mRiggedVariant && shader->mRiggedVariant != shader)
{
@@ -754,7 +748,6 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
target_shader = fullbright_shader;
}
-
if (params.mAvatar != nullptr)
{
target_shader = target_shader->mRiggedVariant;
@@ -764,6 +757,15 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
{// If we need shaders, and we're not ALREADY using the proper shader, then bind it
// (this way we won't rebind shaders unnecessarily).
gPipeline.bindDeferredShaderFast(*target_shader);
+
+ if (params.mFullbright)
+ { // make sure the bind the exposure map for fullbright shaders so they can cancel out exposure
+ S32 channel = target_shader->enableTexture(LLShaderMgr::EXPOSURE_MAP);
+ if (channel > -1)
+ {
+ gGL.getTexUnit(channel)->bind(&gPipeline.mExposureMap);
+ }
+ }
}
LLVector4 spec_color(1, 1, 1, 1);