diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-07-19 09:40:51 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-07-19 09:40:51 -0500 |
commit | a44fa7b1a3392f74735c664d1852707f52eae00f (patch) | |
tree | 4abcaa2712f7bcad8241e4e549f4b302417b6e04 /indra/newview/llvovolume.cpp | |
parent | bb08f68db1233870fd4615a68543220c8d608b93 (diff) | |
parent | ca008cfc3165eefeb42b2894e3e99ecf4c21f0c8 (diff) |
Merge branch 'DRTVWR-559' of github.com:secondlife/viewer into DRTVWR-559
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 4c70874bc9..b521dcba5a 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -6196,7 +6196,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; @@ -6208,8 +6207,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; @@ -6229,14 +6227,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(); @@ -6490,12 +6483,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)) { @@ -6525,7 +6521,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); } @@ -6546,7 +6542,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace } else { - if (opaque) + if (blinn_phong_opaque) { registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT); } @@ -6557,7 +6553,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace } } } - else if (transparent) + else if (blinn_phong_transparent) { registerFace(group, facep, LLRenderPass::PASS_ALPHA); } |