mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-08-02 19:10:49 -04:00
prepareRender() re-uploaded every animated M2 instance's bone matrices into the mega bone SSBO every frame — including the majority whose bones were never recomputed because they are distance, frustum, or frame-skip culled and keep their previous matrices. The bonesDirty flag computeBoneMatrices() sets was never consumed. Track the slot each instance last uploaded to per frame index and memcpy only when the bones changed or the slot moved, cutting megabytes of redundant host-visible writes per frame in doodad-dense scenes. The selection circle also re-ran terrain/WMO/M2 floor raycasts every frame; reuse the result while the target's position is unchanged, refreshing every 30 frames so streamed-in geometry still snaps.
2.8 KiB
2.8 KiB