diff options
author | Dave Parks <davep@lindenlab.com> | 2011-05-30 01:26:27 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-05-30 01:26:27 -0500 |
commit | 89473b2dc3ecfa8b813268833edddb5b0abd317d (patch) | |
tree | 0252d59b1ee470ab36b0446da5c4d2e3827fbe1f /indra/llrender/llshadermgr.cpp | |
parent | 8c5fde7ae499a20c5cf2b51f575059dd01693ae8 (diff) | |
parent | eca17c8993aecfd8d69c1b1765f8ac841ad29119 (diff) |
merge
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rw-r--r-- | indra/llrender/llshadermgr.cpp | 72 |
1 files changed, 64 insertions, 8 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index b8f9c60ca9..6fb1e6e437 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -209,7 +209,14 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader) if (features->hasWaterFog) { - if (!shader->attachObject("lighting/lightWaterF.glsl")) + if (features->disableTextureIndex) + { + if (!shader->attachObject("lighting/lightWaterNonIndexedF.glsl")) + { + return FALSE; + } + } + else if (!shader->attachObject("lighting/lightWaterF.glsl")) { return FALSE; } @@ -217,7 +224,14 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader) else { - if (!shader->attachObject("lighting/lightF.glsl")) + if (features->disableTextureIndex) + { + if (!shader->attachObject("lighting/lightNonIndexedF.glsl")) + { + return FALSE; + } + } + else if (!shader->attachObject("lighting/lightF.glsl")) { return FALSE; } @@ -230,14 +244,28 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader) if (features->isShiny && features->hasWaterFog) { - if (!shader->attachObject("lighting/lightFullbrightShinyWaterF.glsl")) + if (features->disableTextureIndex) + { + if (!shader->attachObject("lighting/lightFullbrightShinyWaterNonIndexedF.glsl")) + { + return FALSE; + } + } + else if (!shader->attachObject("lighting/lightFullbrightShinyWaterF.glsl")) { return FALSE; } } else if (features->hasWaterFog) { - if (!shader->attachObject("lighting/lightFullbrightWaterF.glsl")) + if (features->disableTextureIndex) + { + if (!shader->attachObject("lighting/lightFullbrightWaterNonIndexedF.glsl")) + { + return FALSE; + } + } + else if (!shader->attachObject("lighting/lightFullbrightWaterF.glsl")) { return FALSE; } @@ -245,7 +273,14 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader) else if (features->isShiny) { - if (!shader->attachObject("lighting/lightFullbrightShinyF.glsl")) + if (features->disableTextureIndex) + { + if (!shader->attachObject("lighting/lightFullbrightShinyNonIndexedF.glsl")) + { + return FALSE; + } + } + else if (!shader->attachObject("lighting/lightFullbrightShinyF.glsl")) { return FALSE; } @@ -253,7 +288,14 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader) else { - if (!shader->attachObject("lighting/lightFullbrightF.glsl")) + if (features->disableTextureIndex) + { + if (!shader->attachObject("lighting/lightFullbrightNonIndexedF.glsl")) + { + return FALSE; + } + } + else if (!shader->attachObject("lighting/lightFullbrightF.glsl")) { return FALSE; } @@ -266,7 +308,14 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader) if (features->hasWaterFog) { - if (!shader->attachObject("lighting/lightShinyWaterF.glsl")) + if (features->disableTextureIndex) + { + if (!shader->attachObject("lighting/lightShinyWaterNonIndexedF.glsl")) + { + return FALSE; + } + } + else if (!shader->attachObject("lighting/lightShinyWaterF.glsl")) { return FALSE; } @@ -274,7 +323,14 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader) else { - if (!shader->attachObject("lighting/lightShinyF.glsl")) + if (features->disableTextureIndex) + { + if (!shader->attachObject("lighting/lightShinyNonIndexedF.glsl")) + { + return FALSE; + } + } + else if (!shader->attachObject("lighting/lightShinyF.glsl")) { return FALSE; } |