diff options
author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-07-31 02:38:13 -0700 |
---|---|---|
committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-07-31 02:38:13 -0700 |
commit | f4a6a434fab9bbce34e5c11408323967c5b5e22e (patch) | |
tree | 8269201e5045d0d4ae18a9af6fa3db3ffa54a881 /indra/newview/llvovolume.cpp | |
parent | 3d73326516c73f880f46e28f14b6c515307ede91 (diff) | |
parent | ca008cfc3165eefeb42b2894e3e99ecf4c21f0c8 (diff) |
Merge branch 'DRTVWR-559' into DRTVWR-583
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 5acf2c198f..556ec083a7 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -6206,7 +6206,6 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace LLSpatialGroup::buffer_map_t buffer_map; LLViewerTexture* last_tex = NULL; - S32 buffer_index = 0; S32 texture_index_channels = 1; @@ -6218,8 +6217,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace if (distance_sort) { texture_index_channels = gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels; - buffer_index = -1; - } + } texture_index_channels = LLGLSLShader::sIndexedTextureChannels; @@ -6239,14 +6237,9 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace tex = NULL; } - if (last_tex == tex) - { - buffer_index++; - } - else + if (last_tex != tex) { last_tex = tex; - buffer_index = 0; } bool bake_sunlight = LLPipeline::sBakeSunlight && facep->getDrawable()->isStatic(); @@ -6500,12 +6493,15 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace } } - F32 te_alpha = te->getColor().mV[3]; + F32 blinn_phong_alpha = te->getColor().mV[3]; bool use_legacy_bump = te->getBumpmap() && (te->getBumpmap() < 18) && (!mat || mat->getNormalID().isNull()); - bool opaque = te_alpha >= 0.999f; - bool transparent = te_alpha < 0.999f; + bool blinn_phong_opaque = blinn_phong_alpha >= 0.999f; + bool blinn_phong_transparent = blinn_phong_alpha < 0.999f; - is_alpha = (is_alpha || transparent) ? TRUE : FALSE; + if (!gltf_mat) + { + is_alpha = (is_alpha || blinn_phong_transparent) ? TRUE : FALSE; + } if (gltf_mat || (mat && !hud_group)) { @@ -6535,7 +6531,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace { if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK) { - if (opaque) + if (blinn_phong_opaque) { registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK); } @@ -6556,7 +6552,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace } else { - if (opaque) + if (blinn_phong_opaque) { registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT); } @@ -6567,7 +6563,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace } } } - else if (transparent) + else if (blinn_phong_transparent) { registerFace(group, facep, LLRenderPass::PASS_ALPHA); } |