diff options
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llpanelface.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 06a45644d0..86642e5635 100755 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -258,7 +258,8 @@ private: // _panel->isAlpha() "lies" when one face has alpha and the rest do not (NORSPEC-329) // need to get per-face answer to this question for sane alpha mode retention on updates. // - U8 default_alpha_mode = object->isImageAlphaBlended(face) ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : LLMaterial::DIFFUSE_ALPHA_MODE_NONE; + bool is_alpha_face = object->isImageAlphaBlended(face); + U8 default_alpha_mode = is_alpha_face ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : LLMaterial::DIFFUSE_ALPHA_MODE_NONE; if (!current_material.isNull()) { @@ -278,6 +279,11 @@ private: LLUUID new_normal_map_id = new_material->getNormalID(); LLUUID new_spec_map_id = new_material->getSpecularID(); + if ((new_alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND) && !is_alpha_face) + { + new_alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE; + } + bool is_default_blend_mode = (new_alpha_mode == default_alpha_mode); bool is_need_material = !is_default_blend_mode || !new_normal_map_id.isNull() || !new_spec_map_id.isNull(); |