summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2023-04-19 15:56:01 -0700
committercosmic-linden <111533034+cosmic-linden@users.noreply.github.com>2023-04-20 11:23:44 -0700
commit95d07ccd8799808036528f8cd09288d83fc0c7e0 (patch)
tree381e2d9652555815bcc75febe8946c4a7be60409 /indra/newview/pipeline.cpp
parentacc6655845d17e05150ceb92e4d145616eefea72 (diff)
SL-19598: Fix shadows not having textures for PBR/non-rigged/alpha blended prims
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp33
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);
}
{