mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-08-02 10:54:38 -04:00
The texture budget added for terrain streaming did nothing here, because this path calls loadModel, which passes a budget of zero and runs to completion — so a transport still pushed 15 large textures through in one frame, around 40ms. The decode was never the problem: the log showed all 15 arriving pre-decoded from the worker and the time going into the GPU upload, which has to happen on the main thread regardless. Hand the parsed model to an incremental uploader instead. It advances one model per frame under a 6ms budget and finishes the spawn only once every texture and group is in, so a half-uploaded transport is never instanced. The spawn tail — render instance, transport registration, doodad batch — moves into finishWmoSpawn so the cached path and the incremental uploader both end the same way, rather than duplicating it.