branchrust_reboot/main/more_lod_optimscancel
9 Commits over 0 Days - Infinitycph!
infoRust development commits are now under /Rust/
Use a hashset for the combined mesh lookup from
169597, Contains was slow on big ass bases
Fixed LODs showing their level a second time after being enabled, was tooking batched blocks out of their batch and back in for nothing
Fixed opening a double door rebuilding the batched walls around it, the door frame now stays batched while the door swings
Regression from
169567
Fixed pooled blocks staying unbatched, their LOD component asked to batch them before their RendererBatch component was enabled
Batched meshes only recalculate UV0 distribution metric, UV1 are for lightmaps which we don't use
Editor profiling, walking around the same big base: RendererCell.ApplyBatches ~4.5ms -> ~3.1ms
Optimised RendererGroup invalidation, only the combined mesh holding the block is switched back to separate renderers
Editor profiling, walking around the same big base: slowest LOD switch ~2.5ms -> ~1ms
Fixed batch groups staying unbatched for good when their rebuild got cancelled by another change in the same cell
Fixed LODs being worked out from the camera position before a respawn or CCTV switch (regression from 169523)
Bunch of LOD optims:
- The budget is now checked mid cell, if a dense cell exceeds the budget we pause and resume on the next frame. Fixes big spikes for large cells
- Camera and player positions are read once per frame instead of by every LOD member
- Static LOD members cache their grid position
- Mesh and renderer LODs skip their update while their distance stays between the same LOD distances
Editor profiling, walking around a big base, LODGrid p99 frame: ~15ms -> ~1ms (max budget)