Fix character geoset mapping and texture corruption on equipment change

Corrected CharGeosets group assignments verified via vertex bounding boxes:
- Group 4 (401+) = gloves/forearms, Group 5 (501+) = boots/shins,
  Group 8 (801+) = sleeves (chest-controlled), Group 9 = kneepads,
  Group 13 (1301+) = pants/trousers, Group 20 (2002) = bare feet
- Changed bare shin default from 501 to 502 for better width match
  with thigh mesh (0.39 vs 0.32, thighs are 0.42)
- Added clearCompositeCache() to prevent stale composite textures
  from being reused across equipment changes
- Fixed character preview geoset defaults to match corrected mapping
This commit is contained in:
Kelsi 2026-02-15 20:53:01 -08:00
parent 8a468e9533
commit ed6b305158
10 changed files with 424 additions and 169 deletions

View file

@ -210,6 +210,9 @@ public:
const std::vector<std::string>& baseLayers,
const std::vector<std::pair<int, std::string>>& regionLayers);
/** Clear the composite texture cache (forces re-compositing on next call). */
void clearCompositeCache();
/** Load a BLP texture from MPQ and return the GL texture ID (cached). */
GLuint loadTexture(const std::string& path);
@ -259,7 +262,8 @@ private:
uint32_t nextInstanceId = 1;
// Maximum bones supported (GPU uniform limit)
static constexpr int MAX_BONES = 200;
// WoW character models can have 210+ bones; GPU reports 4096 components (~256 mat4)
static constexpr int MAX_BONES = 240;
};
} // namespace rendering