mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Refine LOD culling with combined Z and size threshold
Previous threshold (worldZ > 150) was too aggressive and hid Group 95 at worldZ=162 which is legitimate cathedral geometry. New approach: Only hide groups that are BOTH: - High: worldZ > 180 - Very tall: sizeZ > 100 This specifically targets ONLY the floating shell: - Group 92: worldZ=225, sizeZ=251 ✓ culled - Group 93: worldZ=201, sizeZ=165 ✓ culled While preserving legitimate geometry: - Group 95: worldZ=162, sizeZ=131 ✓ kept (Z < 180) - All other groups: Z < 180 ✓ kept
This commit is contained in:
parent
4dfbcbb6f5
commit
7e69978f40
1 changed files with 7 additions and 4 deletions
|
|
@ -1020,13 +1020,16 @@ void WMORenderer::render(const Camera& camera, const glm::mat4& view, const glm:
|
|||
const auto& group = model.groups[gi];
|
||||
|
||||
// Hide floating LOD shell groups that are positioned too high
|
||||
// Groups 92/93 are at worldZ 200-225 (floating shell)
|
||||
// Normal cathedral groups are at worldZ 98-122
|
||||
// Groups 92/93 are at worldZ 200-225 (floating shell with massive height)
|
||||
// Group 95 at worldZ=162 is legitimate (keep it)
|
||||
glm::vec3 groupCenter = (group.boundingBoxMin + group.boundingBoxMax) * 0.5f;
|
||||
glm::vec4 worldCenter = instance.modelMatrix * glm::vec4(groupCenter, 1.0f);
|
||||
glm::vec3 size = group.boundingBoxMax - group.boundingBoxMin;
|
||||
|
||||
if (worldCenter.z > 150.0f) {
|
||||
continue; // Skip groups positioned above Z=150 (floating LOD shell)
|
||||
// Skip groups that are both HIGH (worldZ > 180) AND very tall (sizeZ > 100)
|
||||
// This catches groups 92 (worldZ=225, sizeZ=251) and 93 (worldZ=201, sizeZ=165)
|
||||
if (worldCenter.z > 180.0f && size.z > 100.0f) {
|
||||
continue; // Skip floating LOD shell
|
||||
}
|
||||
|
||||
renderGroup(group, model, instance.modelMatrix, view, projection);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue