mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 11:19:19 +02:00
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.
This commit is contained in:
@@ -681,6 +681,10 @@ void opengl33_renderer::SwapBuffers()
|
||||
+ " traction: " + to_string( m_colorpass.draw_stats.traction, 7 ) + "\n"
|
||||
+ " lines: " + to_string( m_colorpass.draw_stats.lines, 7 ) + "\n"
|
||||
+ "particles: " + to_string( m_colorpass.draw_stats.particles, 7 );
|
||||
|
||||
// profile: dump the steady-state frame breakdown so the fps bottleneck is measured, not guessed
|
||||
{ static int s_f = 0; if( ( ++s_f % 120 ) == 0 ) {
|
||||
WriteLog( "=== FRAME PROFILE ===\n" + m_debugtimestext + "\n" + m_debugstatstext ); } }
|
||||
}
|
||||
|
||||
void opengl33_renderer::draw_debug_ui()
|
||||
|
||||
Reference in New Issue
Block a user