mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
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:
parent
b1104d1e3d
commit
d7d6fe9810
9 changed files with 249 additions and 32 deletions
|
|
@ -35,6 +35,7 @@ struct M2ModelGPU {
|
|||
uint16_t textureAnimIndex = 0xFFFF; // 0xFFFF = no texture animation
|
||||
uint16_t blendMode = 0; // 0=Opaque, 1=AlphaKey, 2=Alpha, 3=Add, etc.
|
||||
uint16_t materialFlags = 0; // M2 material flags (0x01=Unlit, 0x04=TwoSided, 0x10=NoDepthWrite)
|
||||
uint16_t submeshLevel = 0; // LOD level: 0=base, 1=LOD1, 2=LOD2, 3=LOD3
|
||||
glm::vec3 center = glm::vec3(0.0f); // Center of batch geometry (model space)
|
||||
float glowSize = 1.0f; // Approx radius of batch geometry
|
||||
};
|
||||
|
|
@ -58,6 +59,7 @@ struct M2ModelGPU {
|
|||
bool collisionTreeTrunk = false;
|
||||
bool collisionNoBlock = false;
|
||||
bool collisionStatue = false;
|
||||
bool isSmallFoliage = false; // Small foliage (bushes, grass, plants) - skip during taxi
|
||||
|
||||
// Collision mesh with spatial grid (from M2 bounding geometry)
|
||||
struct CollisionMesh {
|
||||
|
|
@ -310,9 +312,11 @@ public:
|
|||
void clearShadowMap() { shadowEnabled = false; }
|
||||
|
||||
void setInsideInterior(bool inside) { insideInterior = inside; }
|
||||
void setOnTaxi(bool onTaxi) { onTaxi_ = onTaxi; }
|
||||
|
||||
private:
|
||||
bool insideInterior = false;
|
||||
bool onTaxi_ = false;
|
||||
pipeline::AssetManager* assetManager = nullptr;
|
||||
std::unique_ptr<Shader> shader;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue