From a0a87db3d76bc78e245e89254db190ba68b3709e Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Wed, 14 Sep 2022 17:04:33 -0500
Subject: [PATCH] SL-17701 Fix for PBR alpha trying to use indexed texture
 batching

---
 indra/newview/llvovolume.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index a02c18d99f8..61589640fef 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5243,6 +5243,11 @@ bool can_batch_texture(LLFace* facep)
 		return false;
 	}
 	
+    if (facep->getTextureEntry()->getGLTFMaterial() != nullptr)
+    { // PBR materials break indexed texture batching
+        return false;
+    }
+
 	return true;
 }
 
-- 
GitLab