diff options
author | simon <simon@lindenlab.com> | 2024-01-09 20:22:37 +0000 |
---|---|---|
committer | simon <simon@lindenlab.com> | 2024-01-09 20:22:37 +0000 |
commit | a9ef4d2ee8470e944b09402d0f796cb09cdb728d (patch) | |
tree | 4a5b4299c352e671b7aa76eabbf00d546acbf670 /indra/llrender/llshadermgr.cpp | |
parent | eca0021b7dfd40d5b573ae5530cf44edbe3a0994 (diff) | |
parent | 77395eddc911e0801e50fd693f7bbaee8046aa95 (diff) |
Merge remote-tracking branch 'origin/main' into simon/sl-20635-new-data
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rw-r--r-- | indra/llrender/llshadermgr.cpp | 92 |
1 files changed, 18 insertions, 74 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 0e7f9e1331..f78be910d2 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; } @@ -292,7 +278,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")) { @@ -302,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/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); } } |