diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2022-09-09 03:28:12 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2022-09-09 03:28:12 -0700 |
commit | 049fc419d1d1f41ac05e424d599a89366cee7ca7 (patch) | |
tree | ea2f275d9f35346cac4e14f9e11ff954d6a9ce58 /indra/newview/llvovolume.cpp | |
parent | a3dff0db26c5faa1613b29721498baf530f12fed (diff) |
SL-17701: PBR: WIP Alpha Blending
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index ad11fb3908..f1e3d27d7c 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5892,7 +5892,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) bool is_pbr = false; #endif #else - bool is_pbr = facep->getTextureEntry()->getGLTFMaterial() != nullptr; + LLGLTFMaterial *gltf_mat = facep->getTextureEntry()->getGLTFMaterial(); + bool is_pbr = gltf_mat != nullptr; #endif //ALWAYS null out vertex buffer on rebuild -- if the face lands in a render @@ -5960,8 +5961,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) BOOL force_simple = (facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA); U32 type = gPipeline.getPoolTypeFromTE(te, tex); - - if (is_pbr) + if (is_pbr && gltf_mat && gltf_mat->mAlphaMode != LLMaterial::DIFFUSE_ALPHA_MODE_BLEND) { type = LLDrawPool::POOL_PBR_OPAQUE; } @@ -6781,7 +6781,10 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace if (gltf_mat) { // all other parameters ignored if gltf material is present - registerFace(group, facep, LLRenderPass::PASS_PBR_OPAQUE); + if (gltf_mat->mAlphaMode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND) + registerFace(group, facep, LLRenderPass::PASS_ALPHA); + else + registerFace(group, facep, LLRenderPass::PASS_PBR_OPAQUE); } else // do NOT use 'fullbright' for this logic or you risk sending |