Skip bone computation for off-screen M2 instances, sort by model for batched VAO binds, and eliminate sqrt in distance fade

This commit is contained in:
Kelsi 2026-02-07 14:37:14 -08:00
parent 249c4fa842
commit ca88860929
3 changed files with 81 additions and 33 deletions

View file

@ -999,9 +999,10 @@ void Renderer::update(float deltaTime) {
}
}
// Update M2 doodad animations
if (m2Renderer) {
m2Renderer->update(deltaTime);
// Update M2 doodad animations (pass camera for frustum-culling bone computation)
if (m2Renderer && camera) {
m2Renderer->update(deltaTime, camera->getPosition(),
camera->getProjectionMatrix() * camera->getViewMatrix());
}
// Update zone detection and music