Commit 43a4954e authored by NiranV's avatar NiranV
Browse files

Fixed: Shaders being dirtied causing slow code execution when it shouldn't. Thanks to Drake.

parent cb23af3b
......@@ -1525,8 +1525,14 @@ void LLEnvironment::update(const LLViewerCamera * cam)
end_shaders = LLViewerShaderMgr::instance()->endShaders();
for (shaders_iter = LLViewerShaderMgr::instance()->beginShaders(); shaders_iter != end_shaders; ++shaders_iter)
{
if ((shaders_iter->mProgramObject != 0)
&& (gPipeline.canUseWindLightShaders()
if ((shaders_iter->mProgramObject != 0) &&
(shaders_iter->mFeatures.atmosphericHelpers
|| shaders_iter->mFeatures.calculatesAtmospherics
|| shaders_iter->mFeatures.hasAtmospherics
|| shaders_iter->mFeatures.hasGamma
|| shaders_iter->mFeatures.hasTransport
|| shaders_iter->mFeatures.hasWaterFog) &&
(gPipeline.canUseWindLightShaders()
|| shaders_iter->mShaderGroup == LLGLSLShader::SG_WATER))
{
shaders_iter->mUniformsDirty = TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment