diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-07-21 11:27:55 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-07-21 11:27:55 -0400 |
commit | 25330b47f961b68df046665ce0576e6f23d1f3e5 (patch) | |
tree | db84983b338972d1c332b45742c643f9d18c3fe3 /indra/llprimitive/llmaterial.cpp | |
parent | 248f78b45ec9ee275f3b97e50b9962f2e54dbde2 (diff) | |
parent | ec4135da63a3f3877222fba4ecb59b15650371fe (diff) |
SL-18837: Merge branch 'main' of secondlife/viewer into actions
Diffstat (limited to 'indra/llprimitive/llmaterial.cpp')
-rw-r--r-- | indra/llprimitive/llmaterial.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/llprimitive/llmaterial.cpp b/indra/llprimitive/llmaterial.cpp index a219ac1450..fa22145972 100644 --- a/indra/llprimitive/llmaterial.cpp +++ b/indra/llprimitive/llmaterial.cpp @@ -426,18 +426,18 @@ bool LLMaterial::operator != (const LLMaterial& rhs) const } -U32 LLMaterial::getShaderMask(U32 alpha_mode) +U32 LLMaterial::getShaderMask(U32 alpha_mode, BOOL is_alpha) { //NEVER incorporate this value into the message system -- this function will vary depending on viewer implementation - U32 ret = 0; - //two least significant bits are "diffuse alpha mode" - if (alpha_mode != DIFFUSE_ALPHA_MODE_DEFAULT) + //two least significant bits are "diffuse alpha mode" + U32 ret = alpha_mode; + if (ret == DIFFUSE_ALPHA_MODE_DEFAULT) { - ret = alpha_mode; - } - else - { - ret = getDiffuseAlphaMode(); + ret = getDiffuseAlphaMode(); + if (ret == DIFFUSE_ALPHA_MODE_BLEND && !is_alpha) + { + ret = DIFFUSE_ALPHA_MODE_NONE; + } } llassert(ret < SHADER_COUNT); |