17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-01 01:09:04 +01:00

perf(editor): the top view draws the terrain lighter: the cells of its grid some 16 pixels across, not 10, the chunks streamed only as far as the screen reaches, not the range of the 3D view, and the cube map of the reflections not made anew while it's shown, nothing in it reflecting

On test2 at an extent of 300 m: 55 chunks in place of 106, 204 thousand triangles of the terrain in place of 895 thousand (all drawn 0.82 million in place of 2.34), the GPU 1.46 ms a frame in place of 2.33, and 3.6 ms of the CPU less a frame for the reflections. The 3D view stays as it was; the range of 50 km of the tracks work area in 3D cost nothing measurable on l053. Selftest perf logs the chunks of the terrain, their triangles and the steps of their grids.
This commit is contained in:
maj00r
2026-10-24 19:23:01 +02:00
parent dcaf48d7b6
commit 69980b5540
5 changed files with 32 additions and 3 deletions

View File

@@ -937,6 +937,8 @@ bool
opengl_renderer::Render_reflections() {
if( Global.reflectiontune.update_interval == 0 ) { return false; }
// the top view of the editor shows nothing the reflections would be seen on: the cube map stays as it was
if( EditorModeFlag && Global.EditorOrtho ) { return false; }
auto const timestamp { Timer::GetRenderTime() };
if( ( timestamp - m_environmentupdatetime < Global.reflectiontune.update_interval )