perf: add adaptive render scaling and performance capture metadata #1096

Merged
SakulFlee merged 8 commits from sakulflee/render-scale-performance-target into main 2026-11-10 21:48:31 +00:00 AGit
Owner

Adds internal render scaling and adaptive FPS targeting on all platforms, Android refresh-rate fallback, debug UI controls, per-row render resolution capture fields, JSON device metadata, and notebook visualisations for issue #1083. Verified on an Adreno 810 tablet and a Mali-G720 phone.

Adds internal render scaling and adaptive FPS targeting on all platforms, Android refresh-rate fallback, debug UI controls, per-row render resolution capture fields, JSON device metadata, and notebook visualisations for issue #1083. Verified on an Adreno 810 tablet and a Mali-G720 phone.
Scene targets now render at an internal resolution while tonemapping and anti-aliasing stretch the result to the native surface. The tonemap depth lookup is scaled, so light glare keeps sampling the lower-resolution depth texture correctly when the render scale is below 1.0.
RenderSettings and AppSettings now expose a fixed or adaptive render scale with a configurable FPS target. Adaptive scaling runs once per FPS window, is bounded, and is capped by the detected refresh rate and frame limit. Android falls back to the Java display refresh rate and ADPF when winit reports none. Performance captures gain a metadata sidecar plus per-row window, surface, render, scale, DPI, orientation, refresh, present-mode, and frame-latency fields.
The Rendering panel can toggle adaptive render scaling, change the target FPS, and pick fixed 1x/0.75x/0.5x presets. It shows the active surface and internal render resolutions so on-device A/B captures are unambiguous.
Describe the render-scale settings, adaptive target behavior, Android refresh fallback, metadata sidecar, per-row capture fields, and the updated notebook column filtering.
Estimate the frame rate at the next scale before raising it, using the pixel-count ratio. Without this, a scale that only just met the target immediately stepped back up and missed it again. The default minimum render scale is now 0.25, configurable through AppSettings and the Rendering panel.
The per-row CSV already carries the active window, surface, render resolution, scale, DPI, refresh rate, present mode, and frame latency. Rows now also count render-scale and render-target changes in their window, so a capture can be split into stable-resolution segments. The startup metadata sidecar is now performance_meta.json and records the device, GPU driver, display, renderer, and scene defaults for cross-device comparison.
docs(perf): visualise render scaling in the performance notebook
Some checks failed
Lint / lint (pull_request) Successful in 1m36s
Templates / templates (pull_request) Successful in 5m35s
PR / test (pull_request) Has been cancelled
4170bf27e6
Load performance_meta.json as the device-defaults snapshot, add render-scale and resolution timelines with change markers, list transition rows, summarise FPS and frame time per internal render resolution, and plot FPS against render pixel count.
SakulFlee force-pushed sakulflee/render-scale-performance-target from 4170bf27e6
Some checks failed
Lint / lint (pull_request) Successful in 1m36s
Templates / templates (pull_request) Successful in 5m35s
PR / test (pull_request) Has been cancelled
to 6f4011c9dc
All checks were successful
Lint / lint (pull_request) Successful in 1m6s
Templates / templates (pull_request) Successful in 7m57s
PR / test (pull_request) Successful in 17m1s
2026-11-10 20:48:07 +00:00
Compare

Smart test results

Result: PASS

Scope: full workspace

Reason: unmapped change: Tools/performance/performance_report.ipynb

Elapsed: 16m 20s

Workflow run

Overall: 526 tests, 516 passed, 0 failed, 10 skipped

Nextest: 515 tests, 515 passed, 0 failed, 0 skipped
Doctests: 11 tests, 1 passed, 0 failed, 10 skipped

Outcome charts are split between nextest and doctests. The timing chart covers nextest only.

Crate Nextest Passed Failed Skipped Doctests Time
orbital 1 1 0 0 - 0.78s
orbital-cli 3 3 0 0 - 0.03s
orbital_2d 29 29 0 0 0/1 0.16s
orbital_app 25 25 0 0 0/1 0.14s
orbital_billboard 9 9 0 0 - 0.29s
orbital_camera 8 8 0 0 - 0.04s
orbital_core 2 2 0 0 - 0.01s
orbital_debug_render 2 2 0 0 0/1 0.01s
orbital_debug_ui 51 51 0 0 0/1 0.32s
orbital_ecs 114 114 0 0 0/2 0.64s
orbital_ecs_bridge 45 45 0 0 - 0.26s
orbital_file_manager 5 5 0 0 - 0.03s
orbital_iced 26 26 0 0 - 0.17s
orbital_importer_gltf 16 16 0 0 - 0.18s
orbital_input 11 11 0 0 - 0.05s
orbital_light 8 8 0 0 - 0.04s
orbital_macros 0 0 0 0 0/1 0.00s
orbital_material_shader 2 2 0 0 - 0.01s
orbital_math 4 4 0 0 - 0.03s
orbital_mesh 2 2 0 0 - 0.01s
orbital_procgeo 3 3 0 0 - 0.02s
orbital_render_graph 6 6 0 0 - 0.04s
orbital_renderer 22 22 0 0 - 0.25s
orbital_resources 29 29 0 0 - 0.19s
orbital_shader_core 0 0 0 0 1/1 0.00s
orbital_shader_pbr 4 4 0 0 - 0.02s
orbital_shader_preprocessor 12 12 0 0 - 0.06s
orbital_shadow 3 3 0 0 - 0.01s
orbital_text 14 14 0 0 0/1 0.31s
orbital_texture 11 11 0 0 - 0.05s
orbital_touch_ui 1 1 0 0 0/1 0.01s
orbital_ui 32 32 0 0 0/1 0.19s
orbital_world_environment 13 13 0 0 - 0.07s
template_all_in_one 2 2 0 0 - 0.01s
pie showData
    title Nextest outcomes
    "Passed" : 515
pie showData
    title Doctest outcomes
    "Passed" : 1
    "Skipped" : 10
xychart-beta
    title "Slowest crates (nextest seconds)"
    x-axis ["orbital", "orbital_ecs", "orbital_debug_ui", "orbital_text", "orbital_billboard", "orbital_ecs_bridge", "orbital_renderer", "orbital_resources"]
    y-axis "Seconds" 0 --> 1
    bar [0.78, 0.64, 0.32, 0.31, 0.29, 0.26, 0.25, 0.19]
<!-- orbital-ci-test-results --> ## Smart test results **Result:** PASS **Scope:** full workspace **Reason:** unmapped change: Tools/performance/performance_report.ipynb **Elapsed:** 16m 20s [Workflow run](https://forgejo.sakul-flee.de/SakulFlee/Orbital/actions/runs/1212) **Overall:** 526 tests, 516 passed, 0 failed, 10 skipped **Nextest:** 515 tests, 515 passed, 0 failed, 0 skipped **Doctests:** 11 tests, 1 passed, 0 failed, 10 skipped _Outcome charts are split between nextest and doctests. The timing chart covers nextest only._ | Crate | Nextest | Passed | Failed | Skipped | Doctests | Time | | --- | ---: | ---: | ---: | ---: | ---: | ---: | | orbital | 1 | 1 | 0 | 0 | - | 0.78s | | orbital-cli | 3 | 3 | 0 | 0 | - | 0.03s | | orbital_2d | 29 | 29 | 0 | 0 | 0/1 | 0.16s | | orbital_app | 25 | 25 | 0 | 0 | 0/1 | 0.14s | | orbital_billboard | 9 | 9 | 0 | 0 | - | 0.29s | | orbital_camera | 8 | 8 | 0 | 0 | - | 0.04s | | orbital_core | 2 | 2 | 0 | 0 | - | 0.01s | | orbital_debug_render | 2 | 2 | 0 | 0 | 0/1 | 0.01s | | orbital_debug_ui | 51 | 51 | 0 | 0 | 0/1 | 0.32s | | orbital_ecs | 114 | 114 | 0 | 0 | 0/2 | 0.64s | | orbital_ecs_bridge | 45 | 45 | 0 | 0 | - | 0.26s | | orbital_file_manager | 5 | 5 | 0 | 0 | - | 0.03s | | orbital_iced | 26 | 26 | 0 | 0 | - | 0.17s | | orbital_importer_gltf | 16 | 16 | 0 | 0 | - | 0.18s | | orbital_input | 11 | 11 | 0 | 0 | - | 0.05s | | orbital_light | 8 | 8 | 0 | 0 | - | 0.04s | | orbital_macros | 0 | 0 | 0 | 0 | 0/1 | 0.00s | | orbital_material_shader | 2 | 2 | 0 | 0 | - | 0.01s | | orbital_math | 4 | 4 | 0 | 0 | - | 0.03s | | orbital_mesh | 2 | 2 | 0 | 0 | - | 0.01s | | orbital_procgeo | 3 | 3 | 0 | 0 | - | 0.02s | | orbital_render_graph | 6 | 6 | 0 | 0 | - | 0.04s | | orbital_renderer | 22 | 22 | 0 | 0 | - | 0.25s | | orbital_resources | 29 | 29 | 0 | 0 | - | 0.19s | | orbital_shader_core | 0 | 0 | 0 | 0 | 1/1 | 0.00s | | orbital_shader_pbr | 4 | 4 | 0 | 0 | - | 0.02s | | orbital_shader_preprocessor | 12 | 12 | 0 | 0 | - | 0.06s | | orbital_shadow | 3 | 3 | 0 | 0 | - | 0.01s | | orbital_text | 14 | 14 | 0 | 0 | 0/1 | 0.31s | | orbital_texture | 11 | 11 | 0 | 0 | - | 0.05s | | orbital_touch_ui | 1 | 1 | 0 | 0 | 0/1 | 0.01s | | orbital_ui | 32 | 32 | 0 | 0 | 0/1 | 0.19s | | orbital_world_environment | 13 | 13 | 0 | 0 | - | 0.07s | | template_all_in_one | 2 | 2 | 0 | 0 | - | 0.01s | ```mermaid pie showData title Nextest outcomes "Passed" : 515 ``` ```mermaid pie showData title Doctest outcomes "Passed" : 1 "Skipped" : 10 ``` ```mermaid xychart-beta title "Slowest crates (nextest seconds)" x-axis ["orbital", "orbital_ecs", "orbital_debug_ui", "orbital_text", "orbital_billboard", "orbital_ecs_bridge", "orbital_renderer", "orbital_resources"] y-axis "Seconds" 0 --> 1 bar [0.78, 0.64, 0.32, 0.31, 0.29, 0.26, 0.25, 0.19] ```
Sign in to join this conversation.
No description provided.