diff options
author | Alexander Gavriliuk <gavriliuk@gmail.com> | 2023-02-27 08:15:29 +0100 |
---|---|---|
committer | Alexander Gavriliuk <gavriliuk@gmail.com> | 2023-02-27 08:15:29 +0100 |
commit | a6ea3fa741c90b4fe88550085f9a6b52d71447fd (patch) | |
tree | 91c8f0d2e1751bab3d52f8b17c87f3a1558994a6 /indra/newview/llvovolume.cpp | |
parent | fe21f3fdf1e98eb2393449963f6bfd97b1885d44 (diff) |
SL-18882: Show diffuse non-alpha textures opaque on editing
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index b910c4f93c..086e751965 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5295,13 +5295,14 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, if (mat) { + BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (facep->getTextureEntry()->getColor().mV[3] < 0.999f) ? TRUE : FALSE; if (type == LLRenderPass::PASS_ALPHA) { - shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND); + shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND, is_alpha); } else { - shader_mask = mat->getShaderMask(); + shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_DEFAULT, is_alpha); } } @@ -6676,7 +6677,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace LLRenderPass::PASS_NORMSPEC_EMISSIVE, }; - U32 mask = mat->getShaderMask(); + U32 mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_DEFAULT, is_alpha); llassert(mask < sizeof(pass)/sizeof(U32)); |