diff options
author | Dave Parks <davep@lindenlab.com> | 2013-05-06 16:57:13 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-05-06 16:57:13 -0500 |
commit | 9609fa72594dd71f8be6417b5a889cfac7112cfd (patch) | |
tree | 7549ef4fe79639c43a52baeb50d1937c2a343230 /indra/llprimitive | |
parent | 85a123a3e3b07de57bba18e46bdad615174428da (diff) | |
parent | 18e3985120d53acdf07d43dce79312b78629e57a (diff) |
Automated merge with https://bitbucket.org/lindenlab/viewer-development-materials
Diffstat (limited to 'indra/llprimitive')
-rw-r--r-- | indra/llprimitive/llmaterial.cpp | 11 | ||||
-rw-r--r-- | indra/llprimitive/llmaterial.h | 5 |
2 files changed, 12 insertions, 4 deletions
diff --git a/indra/llprimitive/llmaterial.cpp b/indra/llprimitive/llmaterial.cpp index bd98aa040a..ce443dea1d 100644 --- a/indra/llprimitive/llmaterial.cpp +++ b/indra/llprimitive/llmaterial.cpp @@ -186,12 +186,19 @@ bool LLMaterial::operator != (const LLMaterial& rhs) const } -U32 LLMaterial::getShaderMask() +U32 LLMaterial::getShaderMask(U32 alpha_mode) { //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" - ret = getDiffuseAlphaMode(); + if (alpha_mode != DIFFUSE_ALPHA_MODE_DEFAULT) + { + ret = alpha_mode; + } + else + { + ret = getDiffuseAlphaMode(); + } llassert(ret < SHADER_COUNT); diff --git a/indra/llprimitive/llmaterial.h b/indra/llprimitive/llmaterial.h index b294288c64..b265732adc 100644 --- a/indra/llprimitive/llmaterial.h +++ b/indra/llprimitive/llmaterial.h @@ -44,7 +44,8 @@ public: DIFFUSE_ALPHA_MODE_NONE = 0, DIFFUSE_ALPHA_MODE_BLEND = 1, DIFFUSE_ALPHA_MODE_MASK = 2, - DIFFUSE_ALPHA_MODE_EMISSIVE = 3 + DIFFUSE_ALPHA_MODE_EMISSIVE = 3, + DIFFUSE_ALPHA_MODE_DEFAULT = 4, } eDiffuseAlphaMode; typedef enum @@ -100,7 +101,7 @@ public: bool operator == (const LLMaterial& rhs) const; bool operator != (const LLMaterial& rhs) const; - U32 getShaderMask(); + U32 getShaderMask(U32 alpha_mode = DIFFUSE_ALPHA_MODE_DEFAULT); protected: LLUUID mNormalID; |