Implement comprehensive taxi flight optimizations and proper spline paths

Major improvements:
- Load TaxiPathNode.dbc for actual curved flight paths (no more flying through terrain)
- Add 3-second mounting delay with terrain precaching for entire route
- Implement LOD system for M2 models with distance-based quality reduction
- Add circular terrain loading pattern (13 tiles vs 25, 48% reduction)
- Increase terrain cache from 2GB to 8GB for modern systems

Performance optimizations during taxi:
- Cull small M2 models (boundRadius < 3.0) - not visible from altitude
- Disable particle systems (weather, smoke, M2 emitters) - saves ~7000 particles
- Disable specular lighting on M2 models - saves Blinn-Phong calculations
- Disable shadow mapping on M2 models - saves shadow map sampling and PCF

Technical details:
- Parse TaxiPathNode.dbc spline waypoints for curved paths around terrain
- Build full path from node pairs using TaxiPathEdge lookup
- Precache callback triggers during mounting delay for smooth takeoff
- Circular tile loading uses Euclidean distance check (dx²+dy² <= r²)
- LOD fallback to base mesh when higher LODs unavailable

Result: Buttery smooth taxi flights with no terrain clipping or performance hitches
This commit is contained in:
Kelsi 2026-02-08 21:32:38 -08:00
parent 941dac446d
commit 536b3cea48
9 changed files with 249 additions and 32 deletions

View file

@ -1552,7 +1552,9 @@ void Renderer::renderWorld(game::World* world) {
}
// Render weather particles (after terrain/water, before characters)
if (weather && camera) {
// Skip during taxi flights for performance and visual clarity
bool onTaxi = cameraController && cameraController->isOnTaxi();
if (weather && camera && !onTaxi) {
weather->render(*camera);
}
@ -1586,11 +1588,15 @@ void Renderer::renderWorld(game::World* world) {
// Dim M2 lighting when player is inside a WMO
if (cameraController) {
m2Renderer->setInsideInterior(cameraController->isInsideWMO());
m2Renderer->setOnTaxi(cameraController->isOnTaxi());
}
auto m2Start = std::chrono::steady_clock::now();
m2Renderer->render(*camera, view, projection);
m2Renderer->renderSmokeParticles(*camera, view, projection);
m2Renderer->renderM2Particles(view, projection);
// Skip particle fog during taxi (expensive and visually distracting)
if (!onTaxi) {
m2Renderer->renderSmokeParticles(*camera, view, projection);
m2Renderer->renderM2Particles(view, projection);
}
auto m2End = std::chrono::steady_clock::now();
lastM2RenderMs = std::chrono::duration<double, std::milli>(m2End - m2Start).count();
}