mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
Background BLP texture pre-decoding + deferred WMO normal maps (12x streaming perf)
Move CPU-heavy BLP texture decoding from main thread to background worker threads for all hot paths: terrain M2 models, WMO doodad M2s, WMO textures, creature models, and gameobject WMOs. Each renderer (M2, WMO, Character) now accepts a pre-decoded BLP cache that loadTexture() checks before falling back to synchronous decode. Defer WMO normal/height map generation (3 per-pixel passes: luminance, box blur, Sobel) during terrain streaming finalization — this was the dominant remaining bottleneck after BLP pre-decoding. Terrain streaming stalls: 1576ms → 124ms worst case.
This commit is contained in:
parent
0313bd8692
commit
7ac990cff4
13 changed files with 573 additions and 109 deletions
|
|
@ -121,6 +121,12 @@ struct PendingTile {
|
|||
// Pre-loaded terrain texture BLP data (loaded on background thread to avoid
|
||||
// blocking file I/O on the main thread during finalizeTile)
|
||||
std::unordered_map<std::string, pipeline::BLPImage> preloadedTextures;
|
||||
|
||||
// Pre-decoded M2 model textures (decoded on background thread)
|
||||
std::unordered_map<std::string, pipeline::BLPImage> preloadedM2Textures;
|
||||
|
||||
// Pre-decoded WMO textures (decoded on background thread)
|
||||
std::unordered_map<std::string, pipeline::BLPImage> preloadedWMOTextures;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue