summaryrefslogtreecommitdiff
path: root/indra/llrender/llshadermgr.cpp
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2024-01-19 11:36:56 -0600
committerGitHub <noreply@github.com>2024-01-19 11:36:56 -0600
commit6dd260c3699148b4ddf8e7bff84f4b19f8bbf076 (patch)
tree6c9144f701ecb2cda859baaeed4e2f4ee6f9a683 /indra/llrender/llshadermgr.cpp
parent45547c7bbadf15804f54bb28fd1c94eb5f080bf5 (diff)
parent09ee84f675cf08f98cbd49516c5e01c289b42a20 (diff)
Merge branch 'release/materials_featurette' into DRTVWR-592
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rw-r--r--indra/llrender/llshadermgr.cpp92
1 files changed, 18 insertions, 74 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index d1ff85c85b..5522c8f9ad 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -81,14 +81,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
// NOTE order of shader object attaching is VERY IMPORTANT!!!
if (features->calculatesAtmospherics)
{
- if (features->hasWaterFog)
- {
- if (!shader->attachVertexObject("windlight/atmosphericsVarsWaterV.glsl"))
- {
- return FALSE;
- }
- }
- else if (!shader->attachVertexObject("windlight/atmosphericsVarsV.glsl"))
+ if (!shader->attachVertexObject("windlight/atmosphericsVarsV.glsl"))
{
return FALSE;
}
@@ -201,14 +194,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
if(features->calculatesAtmospherics || features->hasGamma || features->isDeferred)
{
- if (features->hasWaterFog)
- {
- if (!shader->attachFragmentObject("windlight/atmosphericsVarsWaterF.glsl"))
- {
- return FALSE;
- }
- }
- else if (!shader->attachFragmentObject("windlight/atmosphericsVarsF.glsl"))
+ if (!shader->attachFragmentObject("windlight/atmosphericsVarsF.glsl"))
{
return FALSE;
}
@@ -300,7 +286,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
}
// NOTE order of shader object attaching is VERY IMPORTANT!!!
- if (features->hasWaterFog)
+ if (features->hasAtmospherics)
{
if (!shader->attachFragmentObject("environment/waterFogF.glsl"))
{
@@ -310,82 +296,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/lightWaterAlphaMaskNonIndexedF.glsl"))
- {
- return FALSE;
- }
- }
- else
+ if (!shader->attachFragmentObject("lighting/lightAlphaMaskNonIndexedF.glsl"))
{
- if (!shader->attachFragmentObject("lighting/lightWaterNonIndexedF.glsl"))
- {
- return FALSE;
- }
+ return FALSE;
}
}
- else
+ else
{
- if (features->hasAlphaMask)
- {
- if (!shader->attachFragmentObject("lighting/lightWaterAlphaMaskF.glsl"))
- {
- return FALSE;
- }
- }
- else
+ if (!shader->attachFragmentObject("lighting/lightNonIndexedF.glsl"))
{
- 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/lightAlphaMaskF.glsl"))
{
- if (!shader->attachFragmentObject("lighting/lightAlphaMaskNonIndexedF.glsl"))
- {
- return FALSE;
- }
- }
- else
- {
- 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);
}
}