branchrust_reboot/main/global_networked_basescancel
398 Commits over 153 Days - 0.11cph!
Merge from main -> global_networked_bases
Disabled redundant disabled reflection probes on a bunch of building blocks
Add debug message when a prefab with a disabled reflection gameobject is found (to quickly find prefabs)
Remove disabled reflection probe renderers from left & right conditional walls
Frustum culling fixed & works based off max render range
Fix NativeArray.Add() expanding array size every time
Expand RenderData & ComputeBuffer
Frustum culling entire grids before rendering to test
Lots of fixes make the grid based rendering minimally functional again
Add `Instancing` namespace
Start implementing storing meshes into grids to enforce max render distance & frustum culling effeciently
Reduce from 6 to 2 frustum planes
Fix twig foundations not showing
Cull shadows at shadow distance
Make a separate monobehavior to call into InstancedEntityScheduler
- due to PreProcess is being called before the InstancedEntityScheduler was spawned
Fix unity "startIndex" with DrawMeshInstancedIndirect() not working
Implement custom shader property "_InstancedIndexOffset" to fix it
Add `test_instanced_culling` command to spawn in 50k-200k random prefabs
Fix race condition in culling job by uncommenting original threadsafe increment
Add placeholder sorting of input data to see if sorting significantly speeds up culling job
Culling job now runs across multiple threads via job system
Disable ParallelForRestriction in culling job
Remove redundant reflection probe renderer from wall prefabs
Do distance culling before frusum culling
Measure culling job execution time
Bunch of small fixes
FINALLY rendering in the correct place again because I had to use a separate computebuffer for each DrawMeshInstancedindirect() call?
Wrote again to have single array to make job system happy
Input: large unsorted NativeArray of every meshes
Cull and sort them in the job system
Render each mesh from a large compute buffer of the output
Not rendering in exactly the right place but need to checkpoint
Progress of rewriting MeshRenderers to use a single NativeArray for every mesh instead of a separate NativeArray for each type of mesh
Convert jobs to use NativeArray instead of List
Add InstancedMeshFilter to workbenches & window embrasures
Try to fix LODs disappearing when crossing barriers
Move PreProcess after the prefab gets set to 0,0,0 to allow normal localToWorld
Add `Transform.LocalPrefabToRoot()` extension method to calculate localToWorld regardless of prefab's world position
Remove hack of setting prefabs to 0,0,0 before we PreProcessed them when isolating problems
Ensure LODs are ordered when processing them
Converted worldToLocal -> localToWorld
With matricies but still the same broken positions!
Got it "working" again
Job system runs on main thread til we figure out NativeList
Fix building blocks & prefabs not registering
Warmup prefabs in the editor manually based on network updates
Rewrote the code that determines what conditional model(s) to show based on grade, skin & modelState
Fixed prefabs that are no longer SingletonComponents
Clean up `InstancedMeshConverter` and register `InstancedPrefabConfig` out of `PrefabPreProcess` as well
Implemented skeleton of a job based frustum culling & lod culling system
Properly extract building grades & conditional models via PrefabPreProcess into code based configs
Update all building block prefabs with InstancedMeshFilter
Tool to auto convert all building blocks with one button click (and 30 minutes of waiting as unity saves them one by one)
Update editor tool to convert prefabs to InstancedMeshFilter
Beginning of massive refactor to support all entities & all types of world prefabs
Show instanced renderers, meshes, triangles & verticies drawn per frame with `perf 7`
Changed `global_networking` to a startup parameter that enabled/disables instanced rendering completely
Disable global rendering on barricade prefabs
Add "global_rendering" convar to disable renderers using the lowest LOD
Fix instanced rendering outside of network range defaulting to the highest LOD instead of lowest LOD
Add InstancedRenderScheduler & InstancedEntityScheduler prefabs to bundles/prefabs/world so they always spawn
Trying to profile an error that turned out to be corrupted asset bundles
merge from main -> global_networked_bases
Fix "Native Collection not disposed" error (forgot to dispose a NativeArray)
Fix compilation error on client
Refactor `InstancedEntityRenderScheduler` into `InstancedEntityScheduler` and `InstancedRenderScheduler`
First cleanup of code
All instanced rendering commands restricted to admins
Fix windmill scale being wrong as we weren't taking the full scale of individual MeshRenderers into account
Fixed so instanced rendering will show for entities not in network range
Small refactor
Fixed shipping_container_skin material missing randomization tint map
Disable instanced rendering on concrete barricade & sandbag (they have skins)
Remove old "windmill_main" model from windmill
Enable GPU instancing on windmill material
Use total scale of mesh instead of only localScale of renderer gameobject
merge from main -> global_networked_bases