summaryrefslogtreecommitdiff
path: root/indra/llrender/llshadermgr.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-05-30 01:26:27 -0500
committerDave Parks <davep@lindenlab.com>2011-05-30 01:26:27 -0500
commit89473b2dc3ecfa8b813268833edddb5b0abd317d (patch)
tree0252d59b1ee470ab36b0446da5c4d2e3827fbe1f /indra/llrender/llshadermgr.cpp
parent8c5fde7ae499a20c5cf2b51f575059dd01693ae8 (diff)
parenteca17c8993aecfd8d69c1b1765f8ac841ad29119 (diff)
merge
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rw-r--r--indra/llrender/llshadermgr.cpp72
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;
}