mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix geoset filtering for M2 models
Group 0 (body parts 0-18) always renders all submeshes since they represent different body parts. Other groups filter by exact submeshId match to show only one variation per group.
This commit is contained in:
parent
b4ae2c7b67
commit
c053631c7a
1 changed files with 13 additions and 1 deletions
|
|
@ -1216,8 +1216,20 @@ void CharacterRenderer::render(const Camera& camera, const glm::mat4& view, cons
|
|||
}
|
||||
|
||||
// Draw batches (submeshes) with per-batch textures
|
||||
// TODO: Geoset filtering disabled - need to determine actual submesh ID format
|
||||
// Geoset filtering: Group = submeshId / 100, Variation = submeshId % 100
|
||||
// Group 0 (body parts): always render all (0-99 are different body parts, not variations)
|
||||
// Other groups: render only if exact submeshId is in activeGeosets
|
||||
for (const auto& batch : gpuModel.data.batches) {
|
||||
if (!instance.activeGeosets.empty()) {
|
||||
uint16_t group = batch.submeshId / 100;
|
||||
if (group != 0) {
|
||||
// Non-body groups: require exact match
|
||||
if (instance.activeGeosets.find(batch.submeshId) == instance.activeGeosets.end()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// Group 0 (body): always render
|
||||
}
|
||||
|
||||
// Resolve texture for this batch
|
||||
GLuint texId = whiteTexture;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue