16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-17 23:39:18 +02:00
Files
maszyna/simulation
maj00r 04c0a03659 Build the spawn surroundings on the loading screen, centred on the spawn
Two bugs left the terrain and models around the camera unbuilt on a big scenery:
- the first visual pass centred its section set on Global.pCamera.Pos, which the
  driver hasn't positioned yet during load (reads 0,0,0) -> it built empty
  sections at the origin and the spawn stayed bare. Centre on the sampled eye
  (player / first vehicle) instead.
- the first (spawn) pass ran in the driver at a small per-frame budget on a live,
  low-fps scene, so it crawled and never finished. Run it on the loading screen
  (generous budget, nothing rendering), then hand to the driver once the spawn is
  ready; the driver streams the rest as the camera moves.

Also drops the per-node capture index: capturing params/paths for a million nodes
cost more than the rescans it saved. Every cycle is now a plain scan-and-build of
the wanted sections (it finishes; a bake-time section index is the real cure for
the remaining first-pass scan time).

Result on tomaszewo: spawn now builds + renders (41k instances, ~hundreds of fps
once loaded). Remaining: load time is long (the 1M-node scan) -- next targets are
the getToken scan, the 380us/model build, and the 13s create_map_geometry finalize.

Adds load + frame profilers (behind WriteLog) used to find all of the above.
2026-06-25 22:13:27 +02:00
..