Commit Graph

8 Commits

Author SHA1 Message Date
Antoine Pilote
5cbff413b4 Clutter culling (#5108)
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
2026-07-01 12:22:54 -07:00
Antoine Pilote
a8c2ad9cb2 fix screencoverage calculation for LOD clutter (#4921) 2026-05-26 07:31:46 -07:00
Antoine Pilote
01c5fc2b2c Clutter LODs for instanced models (#4786)
* 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
2026-05-19 10:04:55 -07:00
Antoine Pilote
b753da41dd Clutter prop instanced (#4770)
No longer need to create a prefab to have collision in clutter entries. Just drag your vmdl and it will have collision + being instanced. 

@matek
2026-05-07 11:34:29 -07:00
Lorenz Junglas
972aa9210b Move remaining SceneObjects off mainthread (#4745)
* 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
2026-05-04 17:47:12 +00:00
Carson Kompon
a0cdba7ca6 Re-organize existing Components (#4595)
* Re-categorize SoundscapeTrigger, IndirectLightVolume, and AmbientLight components.

* Rename "Clutter Component" -> "Clutter Renderer" and add to "Rendering" category

* Move CameraComponent into "Rendering" category

* Move particle components into the "Effects" category
2026-04-25 07:26:05 -04:00
Matt Stevens
cdedb6e4c7 All of these SceneCustomObjects should be safe to run on non-main thread
- 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)
2026-04-18 09:22:18 +01:00
Antoine Pilote
45fd416382 Clutter system (#3989)
https://files.facepunch.com/antopilo/1b0311b1/sbox-dev_Ghn3TRf8eM.mp4

https://files.facepunch.com/antopilo/1b0311b1/sbox-dev_yALD2nMaPw.mp4
2026-03-03 17:06:44 -08:00