branchrust_reboot/main/global_networked_basescancel
398 Commits over 153 Days - 0.11cph!
Change test_instanced_culling to spawn prefabs in a predetermined grid shape to identify patterns of meshes that fail to display / disappear
Increase gc.buffer default to 4096 in the editor so big maps don't take forever to load
Update DrawCall buffer from CPU every frame for stability
Fix typo in GPUBuffer<> wrapper
Refactor & organize computebuffers with GpuBuffer<T> wrapper to ensure type safety & standardize the way computebuffers are expanded & created
Always clear the full memory of a ComputeBuffer when it is created
Default copy the existing ComputeBuffer over to the new one when expanding it
Write the entire DrawCall array to the ComputeBuffer when it expands
Some more cleanup
Turns out the fix for clearing buffers somehow got undone which explains all the strange behavior I was seeing
Write IndirectArgs inside a separate compute shader
Fix submeshes not having their indirect args properly offset
Refactor to clean up compute shaders
Clear temp buffer before culling
Adding some debug while chasing down building blocks being rendered with the wrong mesh
Fix flickering by using a separate buffer in the middle of culling & clearing separate buffer with a separate compute shader
Small refactoring of compute shaders
Cherrypick
85500 &
85501 (2021 compile fixes & remove BeginWrite)
Merge gpu_culling into global_networked_bases
Rename all instanced debug commands & remove redundant ones
Reimplement debugging commands with the new class structure & cell allocator
Re-enable burst on culling jobs
Fix RendererArray having initial capacity of 32k instead of 512 (typo) causing other arrays not to be resized alongside it
Fix DrawCallArray not resizing immediately after adding draw call
Fix IndirectArgs not scaling to 5x the size of the draw calls (for 5 uint each draw call)
Disable burst for all culling jobs
Added instanced rendering inside the SceneView (only runs inside editor)
Merge cell_pooling -> global_networked_bases
Merge cell_pooling -> global_networked_bases
Re-convert building block prefabs after merge from main
Merge from main -> global_networked_bases
Fixed meshes randomly disappearing due to using draw call index instead of renderer index
Merging rewrite back into global_networked_bases
Region out client analytics variables that are "assigned but never used" when compiling client
Fix `test_instancing_culling` spawning prefabs outside of the map and overloading the "out of map" grid
Fix "outside of map" grid not having a gridId set and looking like grid #0
Refactor RendererJobData to store ShadowMode instead of "IsOnlyShadow"
Refactor culling system to completely ignore shadows
Change InstancedScheduler script update order to near the end
Count number of meshes & shadows separately
Add number of rendered meshes, shadows & draw calls for instancing to `perf 8`
Add average number of meshes & shadows drawn to client performance analytics
Add `print_instanced_grid {id}` and `print_instanced_grids` to print meshes per grid for debugging
Add menu option for instanced rendering called "Building Distance" (it also handles cliffs but yea)
Clamp instanced rendering distance from 500 - 2500
Take lower of draw distance vs instanced render distance when culling
Run codegen to apply convar descriptions
Add description to all convars
Add clientside performance analytics for instanced rendering
- culling time
- draw calls
- render distance
- size of compute buffers & arrays
- mesh count
- prefab count
- entity count
Add `shadow_culling` convar to toggle culling of shadows for instanced rendering
Disable shadow culling by default
Fix meshes with skins registering a extra renderer
Add `instanced_memory_usage` command to print off size & memory usage of every array used for instanced rendering
Remove some redundant convars
Add `--instanced-rendering` convar to turn instanced rendering on (if we need it default disabled)
Check if deathInfo.attackerName is null (no idea why this appeared on aux2 but need to fix to keep testing)
Enable GPU instancing on brick roof material
Run Initialize() when leaving server to cleanup all arrays
Cleanup code of all schedulers
Try ComputeBuffer.SetData() instead of ComputeBuffer.BeginWrite() when expanding the compute buffer
Fix MaterialPropertyBlocks not having new ComputeBuffers assigned when the ComputeBuffer is "resized"
More cleanup & hopefully fixes
Fix stackoverflow from typo
Fix setting DrawCallCount to material count instead of submesh count
Refactor & fix writing IndirectArgs
Refactor & fix initialization / cleanup of arrays + compute buffers
Fix IndirectArgs not being rewritten after expanding the compute buffer
Support renderers that have more submeshes than materials
Remove redundant testing convars
Trying to fix errors that appear in CLIENT mode but not CLIENT + SERVER on craggy
Fix IndirectArgs ComputeBuffer not expanding because it is 5 uint each draw call
Merge from main -> global_networked_bases
Cherrypick
84979 (BeginWrite two new compute buffers)