summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-04-25 15:27:39 -0500
committerDave Parks <davep@lindenlab.com>2022-04-25 15:27:39 -0500
commit55179387c7481d3b4ae34f3a53e0256d2705733b (patch)
tree1759bdae97f9c797e895cbac755ee282decb87a7 /indra
parentffdc04f5d2b2d952ace912a473b11f4305e9d057 (diff)
SL-17236 For real this time, maintain legacy draw order of alpha rigged meshes, batching be damned.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvovolume.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 35c415f9db..126a25115d 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5943,7 +5943,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
// for rigged set, add weights and disable alpha sorting (rigged items use depth buffer)
extra_mask |= LLVertexBuffer::MAP_WEIGHT4;
- alpha_sort = FALSE;
rigged = TRUE;
}
@@ -6198,8 +6197,11 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
if (rigged)
{
- //sort faces by things that break batches, including avatar and mesh id
- std::sort(faces, faces + face_count, CompareBatchBreakerRigged());
+ if (!distance_sort) // <--- alpha "sort" rigged faces by maintaining original draw order
+ {
+ //sort faces by things that break batches, including avatar and mesh id
+ std::sort(faces, faces + face_count, CompareBatchBreakerRigged());
+ }
}
else if (!distance_sort)
{
@@ -6234,11 +6236,6 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
texture_index_channels = gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels;
}
- if (rigged)
- { //don't attempt distance sorting on rigged meshes, not likely to succeed and breaks batches
- distance_sort = FALSE;
- }
-
if (distance_sort)
{
buffer_index = -1;