branchrust_reboot/main/global_networked_basescancel
398 Commits over 153 Days - 0.11cph!
Default multidraw to false on 2019 (for editor) as it only works in 2021 and causes nothing to render when enabled
Change tooltip for global rendering option & add tooltip for global render distance
Add menu option to turn instanced rendering on and off (called global rendering)
Rename `building_distance` to `global_render_distance`
Add `instanced_rendering` convar that is saved but only applies at startup
Merge from main -> global_networked_bases
Cherrypick
86832 (compile fixes)
Increase initial size of mutlidraw buffer
Log info instead of error when resizing since it seems to work
Cherrypick
86780 (cache meshes for multidraw)
Tool to list all shaders (so we know what shaders to pay attention to)
Standardize the way we detect meshes with read/write disabled
Mark instancing meshes readable
Change path of prefab converter to only prefabs to speed it up
Add `upload_multidraw_meshes_mode = 0` to control whether meshes are uploaded via the CPU or GPU
default to CPU upload meshes
Mark meshes readable for instancing
Add tool to ensure every single mesh used for instancing is marked read/write enabled
Fix global entities being hidden when leaving network range
Cherrypick
86740 (ensure mesh is uploaded to GPU)
Fix twig foundation having renderers disabled in prefab
Only run StripEmptyChildren when instancing is enabled (don't believe this is the problem but better safe)
Fix junkpile_i being invisible by cancelling instancing sooner when it is disabled via config
Don't global network parented entities (to fix tugboats)
Disable instancing on ice throne chair
Zero the entire `VertexData` struct instead of only color when copying the mesh on the GPU
Reimplement `#if UNITY_2021` after implementing GPU copy of meshes
Cherrypick
86650,
86651,86655 from global_networked_bases/2021 (compile fixes & GPU copy mesh for multidraw)
More `#if UNITY_2021` checks
Bunch of `#if UNITY_2021` conditional compilation to keep it working on 2019
Merge from 2021 -> global_networked_bases
Fix demos not deleting instanced entities when changing keyframes
Cherrypick demo fix from global_networked_bases/2021/multidraw so they work in editor (and client?)
Merge from main -> global_networked_bases
Enable instanced placeholder on static sam sites
Fix normal sam site missing base platform in placeholder mesh
Fix rotated building blocks not updating visual
15s cooldown when sending rotated building block globally
Rename `InstancedEntityScheduler` to `VirtualEntityScheduler`
Clear up performance text
Remove instanced triangles from performance text as we don't know on CPU how many meshes will be rendered post GPU culling
Change slider range of instanced rendering from 500-1500
Default instanced rendering distance 1000m
Convar still can go from 500-2500
Categorize mesh renderers based on prefab the mesh came from
Add commands to toggle rendering of certain meshes: `instanced_toggle_buildings`, `instanced_toggle_cliffs`, `instanced_toggle_other`
Rename `instanced_rendering` to `instanced_toggle_all`
Ensure all instancing classes have instancing namespace
Removing unused MeshAllocator instance in VirtualMeshScheduler
Use the correct CellAllocator instance when computebuffer_setdata_immediate is false
Expose ability to get every virtual mesh that is visible for an entity
Added Float4x4Ex to get position and rotation from a matrix easily
Fix highlighting building blocks when looking at them with a hammer
Added computebuffer_setdata_immediate convar (does what the name says), defaults to true on OSX since SetData seems to have a ton of memory overhead in Unity's OSX implementation
Enabled instanced rendering on OSX by default again
Fix recycled cells not rewriting their header causing them to become creater than 32 elements, overwriting other cells and breaking stuff
Log error if the cell ever goes above 32 elements again
Change `RenderSlices.Length` to `RendererCount` in the PreCull job
Fix "ghost blocks" appearing due to PreCulling job not reseting slice when a mesh count goes down to 0
GPUBuffer data preservation / copy when expanding is now optional
Fixed FreeNativeMemory before AllocateNativeMemory in a few subclasses
Fixed a few == vs <= "better safe than sorry" cases
PreCullJob now runs after LateUpdate instead of after Update so changes in LateUpdate doesn't mess things up
Fixed DrawCallManager.AddDrawCall not immediately updating if it was resized
Disabled by default on OSX standalone until we sort out the memory leak
Fixed some issues with --normal-rendering
Fix errors that kick the player not including the serverAddress to sentry
Include loglevel of error so we can see what errors kick people
Fix "list prefabs" editor button erroring
Disable instancing on ladder
Merge global_networked_bases/proper_disable_command
Add `InstancingConfigComponent` to root level of component
Add option via the config to disable instancing on a prefab
Disable instancing on `junkpile_i` as it uses a cliff child prefab that supports instancing
Also disable instancing on portal prefab