branchrust_reboot/main/more_lod_optimscancel
23 Commits over 31 Days - 0.03cph!
infoRust development commits are now under /Rust/
Clear foundation grid on disconnect to fix NRE
Guard OnAncestorParentChangedClient NRE
One more CullWhenInside iteration, the previous one could cause big delays in bushes updating in the jungle, due to all loaded bushes clogging the work queue
Now: One grid for bushes, one grid for foundations, no work queue, no physics
Use a sparse grid for CullWhenInside so foundations changing only queues nearby bushes into the work queue
Add some pool analyzer attributes
Reset the flag when pooled, doesnt seem to cause issues but good practice
Building blocks, workbenches, planters, container io entities now also override IsEntityDynamic to false so things attached to them can be static
Also update dynamic state when the ancestor parent changes (could cause issues when for example a storage adaptor is parented to a box which then gets parented to a boat, but the adaptor wouldn't know)
Enable jakes dynamic_occlusion_pausing by default again
Possibly fix the "door stuck half open after alt tabbing" issue that caused us to revert it last time
Fix LODComponentParticleSystem allocating a delegate on every show, hide and disable
Disable 78 baked LOD isDynamic flags from 44 prefabs that never move on their own, main ones include loot crates, diesel barrel, industrial crafter and conveyor lights
They will still become dynamic when parented as usual, but now they can be static when not
DisplayingBoxStorage now creates the visuals at their position before enabling them, and applies the box's dynamic state to them when spawned - allows making all of the 17 contents prefabs not dynamic by default
New CullWhenInside combined approach with jarryds and my original fixes joined together
- Keep the work queue with its own budget
- Bushes are only queued when foundations change
merge from main
stomp local CullWhenInside changes
Fix caboose lights missing their volumetric beams the first time you turn them on with the light switch
Caused by AmbientLightLOD skipping the first faded toggle after an instant one
Fix LightGroupAtTime pooling bugs, caused caboose lights to become darker on reuse
Cache authored light intensities once at the start, later they could be changed from their defaults when coming out of the pool
Rework previous fix for entities that were forced dynamic due to being parented never resetting the flag when pooled
New IPoolReset interface that Poolable calls when entering the pool to reset cached behaviours, instead of multiple GetComponentsInChildren in ResetState
Also reset RendererBatch disabled flag set by parenting so that a pooled instance can batch again after reuse
Fix renderer key allocating a materials array on every batch group lookup, now uses a pooled list
Saves ~620 KB when loading in a big base in editor
Also fixed a small logic error in RendererKey.Equals
Stop bush clutter running physics queries on every LODManager visit and taking a large part of its budget, now only runs when bush culling blocks (foundations) change
Disable CullBushes on boat hull blocks, not needed
Fix industrial pipe segments being permanently dynamic via flag on the prefab, toggle their LODs only when on a moving parent like base io lines
Fix entities that were forced dynamic due to being parented never resetting the flag when pooled and staying dynamic when reused without a parent