diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-04-20 13:39:41 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-04-20 13:39:41 -0500 |
commit | 4b224286fe97de7399d0b72066d7646c65faabb6 (patch) | |
tree | 0ab30ec8ab38fb458487923faf3bef33865e0574 /indra/newview/pipeline.cpp | |
parent | 49a88c6f5a890129b094669659931513bd804adc (diff) | |
parent | 95d07ccd8799808036528f8cd09288d83fc0c7e0 (diff) |
Merge branch 'DRTVWR-559' of github.com:secondlife/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c42bb45926..dc500465e2 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6751,7 +6751,8 @@ void LLPipeline::renderShadowSimple(U32 type) gGLLastMatrix = NULL; } -void LLPipeline::renderAlphaObjects(bool texture, bool batch_texture, bool rigged) +// Currently only used for shadows -Cosmic,2023-04-19 +void LLPipeline::renderAlphaObjects(bool rigged) { LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; assertInitialized(); @@ -6768,9 +6769,20 @@ void LLPipeline::renderAlphaObjects(bool texture, bool batch_texture, bool rigge LLDrawInfo* pparams = *i; LLCullResult::increment_iterator(i, end); + if (rigged != (pparams->mAvatar != nullptr)) + { + // Pool contains both rigged and non-rigged DrawInfos. Only draw + // the objects we're interested in in this pass. + continue; + } + if (rigged) { - if (pparams->mAvatar != nullptr) + if (pparams->mGLTFMaterial) + { + mSimplePool->pushRiggedGLTFBatch(*pparams, lastAvatar, lastMeshId); + } + else { if (lastAvatar != pparams->mAvatar || lastMeshId != pparams->mSkinInfo->mHash) { @@ -6779,12 +6791,19 @@ void LLPipeline::renderAlphaObjects(bool texture, bool batch_texture, bool rigge lastMeshId = pparams->mSkinInfo->mHash; } - mSimplePool->pushBatch(*pparams, texture, batch_texture); + mSimplePool->pushBatch(*pparams, true, true); } } - else if (pparams->mAvatar == nullptr) + else { - mSimplePool->pushBatch(*pparams, texture, batch_texture); + if (pparams->mGLTFMaterial) + { + mSimplePool->pushGLTFBatch(*pparams); + } + else + { + mSimplePool->pushBatch(*pparams, true, true); + } } } @@ -6792,6 +6811,7 @@ void LLPipeline::renderAlphaObjects(bool texture, bool batch_texture, bool rigge gGLLastMatrix = NULL; } +// Currently only used for shadows -Cosmic,2023-04-19 void LLPipeline::renderMaskedObjects(U32 type, bool texture, bool batch_texture, bool rigged) { assertInitialized(); @@ -6809,6 +6829,7 @@ void LLPipeline::renderMaskedObjects(U32 type, bool texture, bool batch_texture, gGLLastMatrix = NULL; } +// Currently only used for shadows -Cosmic,2023-04-19 void LLPipeline::renderFullbrightMaskedObjects(U32 type, bool texture, bool batch_texture, bool rigged) { assertInitialized(); @@ -8885,7 +8906,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("shadow alpha blend"); LL_PROFILE_GPU_ZONE("shadow alpha blend"); LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(0.598f); - renderAlphaObjects(true, true, rigged); + renderAlphaObjects(rigged); } { |