mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 08:00:14 +00:00
Add WMO group flag logging for STORMWIND.WMO LOD detection
Added detailed logging when rendering STORMWIND.WMO groups to identify the distant LOD shell that's causing the floating cathedral: - Group index - Group flags (hex) - will reveal which flag marks distant-only groups - Distance from camera to group center - Vertex count (helps identify simplified LOD geometry) Logs once per session to avoid spam. This will help us identify: 1. Which groups are the floating LOD shell 2. What flag value indicates 'distant view only' 3. Proper distance threshold for LOD culling Next step: Use flag pattern to hide distant groups when camera is close.
This commit is contained in:
parent
411ee8b485
commit
20bd54f9d4
1 changed files with 17 additions and 0 deletions
|
|
@ -991,6 +991,23 @@ void WMORenderer::render(const Camera& camera, const glm::mat4& view, const glm:
|
|||
|
||||
shader->setUniform("uModel", instance.modelMatrix);
|
||||
|
||||
// Debug logging for STORMWIND.WMO groups to identify LOD shell
|
||||
static bool loggedStormwindGroups = false;
|
||||
if (!loggedStormwindGroups && instance.modelId == 10047) {
|
||||
glm::vec3 cameraPos = camera.getPosition();
|
||||
float distToWMO = glm::length(cameraPos - instance.position);
|
||||
LOG_INFO("=== STORMWIND.WMO Group Rendering (dist=", distToWMO, ") ===");
|
||||
for (uint32_t gi : dl.visibleGroups) {
|
||||
const auto& group = model.groups[gi];
|
||||
glm::vec3 groupCenter = (group.boundingBoxMin + group.boundingBoxMax) * 0.5f;
|
||||
glm::vec4 worldCenter = instance.modelMatrix * glm::vec4(groupCenter, 1.0f);
|
||||
float distToGroup = glm::length(cameraPos - glm::vec3(worldCenter));
|
||||
LOG_INFO(" Group ", gi, ": flags=0x", std::hex, group.groupFlags, std::dec,
|
||||
" dist=", distToGroup, " verts=", group.vertexCount);
|
||||
}
|
||||
loggedStormwindGroups = true; // Only log once to avoid spam
|
||||
}
|
||||
|
||||
for (uint32_t gi : dl.visibleGroups)
|
||||
renderGroup(model.groups[gi], model, instance.modelMatrix, view, projection);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue