summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2023-01-31 15:01:05 -0600
committerDave Parks <davep@lindenlab.com>2023-01-31 15:01:05 -0600
commitc9d56e212aa0117661f9c76545ca84b39412bae7 (patch)
treee57993f680b6260631784c2177b7c0d51ad2b17a /indra/llrender
parentc154f4f6da10df693cbe15e0fe291d5b3c423d32 (diff)
SL-19015 Balance sun/sky ambiance with punctual light ambiance. Prevent irradiance maps from being brighter than the environment.
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llglslshader.cpp18
-rw-r--r--indra/llrender/llglslshader.h5
-rw-r--r--indra/llrender/llpostprocess.cpp2
3 files changed, 4 insertions, 21 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 42b7cc46b3..faa45d59b9 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -1041,26 +1041,10 @@ void LLGLSLShader::bind(bool rigged)
}
}
-void LLGLSLShader::unbind()
+void LLGLSLShader::unbind(void)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
gGL.flush();
- if (sCurBoundShaderPtr)
- {
- sCurBoundShaderPtr->readProfileQuery();
- }
- stop_glerror();
- LLVertexBuffer::unbind();
- glUseProgram(0);
- sCurBoundShader = 0;
- sCurBoundShaderPtr = NULL;
- stop_glerror();
-}
-
-void LLGLSLShader::bindNoShader(void)
-{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
-
LLVertexBuffer::unbind();
if (sCurBoundShaderPtr)
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index 1ec41ebd3c..6c18282fec 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -254,10 +254,9 @@ public:
void bind();
//helper to conditionally bind mRiggedVariant instead of this
void bind(bool rigged);
- void unbind();
-
+
// Unbinds any previously bound shader by explicitly binding no shader.
- static void bindNoShader(void);
+ static void unbind();
U32 mMatHash[LLRender::NUM_MATRIX_MODES];
U32 mLightHash;
diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp
index 0d87800690..f1e5b71207 100644
--- a/indra/llrender/llpostprocess.cpp
+++ b/indra/llrender/llpostprocess.cpp
@@ -376,7 +376,7 @@ void LLPostProcess::doEffects(void)
checkError();
applyShaders();
- LLGLSLShader::bindNoShader();
+ LLGLSLShader::unbind();
checkError();
/// Change to a perspective view