mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
Revert "Fix geoset filtering using correct geosetId from M2 batch"
This reverts commit 45048757ef.
This commit is contained in:
parent
45048757ef
commit
ec6c575894
3 changed files with 4 additions and 6 deletions
|
|
@ -104,10 +104,9 @@ struct M2Batch {
|
||||||
uint32_t vertexStart; // First vertex
|
uint32_t vertexStart; // First vertex
|
||||||
uint32_t vertexCount; // Number of vertices
|
uint32_t vertexCount; // Number of vertices
|
||||||
|
|
||||||
// Geoset info
|
// Geoset info (from submesh)
|
||||||
uint16_t submeshId = 0; // Submesh ID from skin file
|
uint16_t submeshId = 0; // Submesh/geoset ID (determines body part group)
|
||||||
uint16_t submeshLevel = 0; // Submesh level (0=base, 1+=LOD/alternate mesh)
|
uint16_t submeshLevel = 0; // Submesh level (0=base, 1+=LOD/alternate mesh)
|
||||||
uint16_t geosetId = 0; // Geoset ID for filtering (0-18=body, 1xx=hair, etc.)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Attachment point (bone-anchored position for weapons, effects, etc.)
|
// Attachment point (bone-anchored position for weapons, effects, etc.)
|
||||||
|
|
|
||||||
|
|
@ -627,7 +627,6 @@ bool M2Loader::loadSkin(const std::vector<uint8_t>& skinData, M2Model& model) {
|
||||||
batch.textureUnit = db.textureCoordIndex;
|
batch.textureUnit = db.textureCoordIndex;
|
||||||
batch.transparencyIndex = db.textureWeightIndex;
|
batch.transparencyIndex = db.textureWeightIndex;
|
||||||
batch.textureAnimIndex = db.textureTransformIndex;
|
batch.textureAnimIndex = db.textureTransformIndex;
|
||||||
batch.geosetId = db.geosetIndex; // Geoset ID for filtering (from batch, not submesh)
|
|
||||||
|
|
||||||
// Look up proper vertex/index ranges from submesh
|
// Look up proper vertex/index ranges from submesh
|
||||||
if (db.skinSectionIndex < submeshes.size()) {
|
if (db.skinSectionIndex < submeshes.size()) {
|
||||||
|
|
|
||||||
|
|
@ -1179,7 +1179,7 @@ void CharacterRenderer::render(const Camera& camera, const glm::mat4& view, cons
|
||||||
int rendered = 0, skipped = 0;
|
int rendered = 0, skipped = 0;
|
||||||
for (const auto& b : gpuModel.data.batches) {
|
for (const auto& b : gpuModel.data.batches) {
|
||||||
bool filtered = !instance.activeGeosets.empty() &&
|
bool filtered = !instance.activeGeosets.empty() &&
|
||||||
instance.activeGeosets.find(b.geosetId) == instance.activeGeosets.end();
|
instance.activeGeosets.find(b.submeshId) == instance.activeGeosets.end();
|
||||||
|
|
||||||
GLuint resolvedTex = whiteTexture;
|
GLuint resolvedTex = whiteTexture;
|
||||||
std::string texInfo = "white(fallback)";
|
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) {
|
for (const auto& batch : gpuModel.data.batches) {
|
||||||
// Filter by active geosets (if set)
|
// Filter by active geosets (if set)
|
||||||
if (!instance.activeGeosets.empty() &&
|
if (!instance.activeGeosets.empty() &&
|
||||||
instance.activeGeosets.find(batch.geosetId) == instance.activeGeosets.end()) {
|
instance.activeGeosets.find(batch.submeshId) == instance.activeGeosets.end()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue