Adds GPU culling
Fixed collision not working for painted instances
LOD is selected on the GPU now
Improvements on our benchmark: 32ms down to 8ms in some cases
* add LOD switching for clutter model instances
* DrawModelInstamce with correct LOD level
* removed some useless comments. move stuff around
https://files.facepunch.com/antopilo/1b0711b1/sbox-dev_AcVXDWDDah.mp4
* use biggest scale axis to determine screen coverage for clutter lod level
* clamp LOD in managed
* clamp lod in native
* rename lod Count to maxLodCount
* Add CommandList.SetBufferData
* SpriteBatchSceneObject use CommandLists + make thread safe
* Make ScenePanelObject threadsafe
* SceneObjects ExecuteOffTheMainThread by default
* Remove ExecuteOnMainThread = false, assignments since it's now default
* Add Data4 entry to CommandLists allows us to store matrix
* Migrate TextRendering to CommandList
* Migrate Gizmos to CommandList
* Migrate LineRendering to CommandList
* ScenePanel uses CommandList
* Clutter uses commandlist
* Debug SceneObjects use commandlist
* Use CommandList.SetBufferData for sprites and lines
* Fix SceneLineObject using wrong attribtutes to draw
- TextRenderer.TextSceneObject — world text component
- DebugTextureSceneObject — debug overlay textures
- DebugTextSceneObject — debug overlay text
- DebugSphereSceneObject — debug overlay spheres
- SceneMapLoader.TextSceneObject — map world text entities
- LPVDebugGridObject — light probe debug grid
- ClutterBatchSceneObject — clutter instanced rendering
These ones are not as simple:
- ScenePanelObject - so much UI shit wasn't thread safe before, but should nwo be ...
- GizmoInlineSceneObject
- SpriteBatchSceneObject - lots of non concurrent dictionaries around here (needs a commandlist approach)