summaryrefslogtreecommitdiff
path: root/indra/llrender/llshadermgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rw-r--r--indra/llrender/llshadermgr.cpp74
1 files changed, 16 insertions, 58 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index f14216f3d8..f78be910d2 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -278,7 +278,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
}
// NOTE order of shader object attaching is VERY IMPORTANT!!!
- if (features->hasWaterFog || features->hasAtmospherics)
+ if (features->hasAtmospherics)
{
if (!shader->attachFragmentObject("environment/waterFogF.glsl"))
{
@@ -288,82 +288,40 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
if (features->hasLighting)
{
- if (features->hasWaterFog)
+ if (features->disableTextureIndex)
{
- if (features->disableTextureIndex)
+ if (features->hasAlphaMask)
{
- if (features->hasAlphaMask)
+ if (!shader->attachFragmentObject("lighting/lightAlphaMaskNonIndexedF.glsl"))
{
- if (!shader->attachFragmentObject("lighting/lightWaterAlphaMaskNonIndexedF.glsl"))
- {
- return FALSE;
- }
- }
- else
- {
- if (!shader->attachFragmentObject("lighting/lightWaterNonIndexedF.glsl"))
- {
- return FALSE;
- }
+ return FALSE;
}
}
- else
+ else
{
- if (features->hasAlphaMask)
+ if (!shader->attachFragmentObject("lighting/lightNonIndexedF.glsl"))
{
- if (!shader->attachFragmentObject("lighting/lightWaterAlphaMaskF.glsl"))
- {
- return FALSE;
- }
- }
- else
- {
- if (!shader->attachFragmentObject("lighting/lightWaterF.glsl"))
- {
- return FALSE;
- }
+ return FALSE;
}
- shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
}
}
-
- else
+ else
{
- if (features->disableTextureIndex)
+ if (features->hasAlphaMask)
{
- if (features->hasAlphaMask)
- {
- if (!shader->attachFragmentObject("lighting/lightAlphaMaskNonIndexedF.glsl"))
- {
- return FALSE;
- }
- }
- else
+ if (!shader->attachFragmentObject("lighting/lightAlphaMaskF.glsl"))
{
- if (!shader->attachFragmentObject("lighting/lightNonIndexedF.glsl"))
- {
- return FALSE;
- }
+ return FALSE;
}
}
- else
+ else
{
- if (features->hasAlphaMask)
- {
- if (!shader->attachFragmentObject("lighting/lightAlphaMaskF.glsl"))
- {
- return FALSE;
- }
- }
- else
+ if (!shader->attachFragmentObject("lighting/lightF.glsl"))
{
- if (!shader->attachFragmentObject("lighting/lightF.glsl"))
- {
- return FALSE;
- }
+ return FALSE;
}
- shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
}
+ shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
}
}