Fix geoset filtering using correct geosetId from M2 batch

M2 batches have a geosetIndex field that determines the geoset group for
filtering (0-18=body, 1xx=hair, etc.). We were incorrectly using submeshId
from the submesh struct instead. Now properly stores and uses geosetId.
This commit is contained in:
Kelsi 2026-02-05 23:26:30 -08:00
parent 3e50b1071d
commit 45048757ef
3 changed files with 6 additions and 4 deletions

View file

@ -1179,7 +1179,7 @@ void CharacterRenderer::render(const Camera& camera, const glm::mat4& view, cons
int rendered = 0, skipped = 0;
for (const auto& b : gpuModel.data.batches) {
bool filtered = !instance.activeGeosets.empty() &&
instance.activeGeosets.find(b.submeshId) == instance.activeGeosets.end();
instance.activeGeosets.find(b.geosetId) == instance.activeGeosets.end();
GLuint resolvedTex = whiteTexture;
std::string texInfo = "white(fallback)";
@ -1219,7 +1219,7 @@ void CharacterRenderer::render(const Camera& camera, const glm::mat4& view, cons
for (const auto& batch : gpuModel.data.batches) {
// Filter by active geosets (if set)
if (!instance.activeGeosets.empty() &&
instance.activeGeosets.find(batch.submeshId) == instance.activeGeosets.end()) {
instance.activeGeosets.find(batch.geosetId) == instance.activeGeosets.end()) {
continue;
}