MONKEY (perf): FPS probe runs unfocused windows continuous; night probe scenarios

A probe window opens unfocused and WinitSettings::game() drives an unfocused
window at reactive 1/60 s, so every FPS_PROBE read ~16.7 ms whatever the scene
cost (Classic at 720p with 0.4 ms of GPU read 57 fps). Probes now run
Continuous in both modes. Adds perf-northshire-night / perf-abbey-night.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pkuzic
2026-09-26 04:01:33 +01:00
co-authored by Claude Opus 5.5
parent 1ba4876a11
commit fff74b21e8
2 changed files with 27 additions and 0 deletions
+8
View File
@@ -885,6 +885,14 @@ impl Plugin for CapturePlugin {
// constant 16.67 ms for any scene, however slow.
app.insert_resource(TimeUpdateStrategy::ManualDuration(CAPTURE_FRAME_DT))
.add_systems(Startup, hold_clock);
// MONKEY (perf): a probe window opens unfocused, and `WinitSettings::game()` runs an
// unfocused window at reactive 1/60 s — every probe read 16.7 ms whatever the scene cost.
if probe_frames > 0 {
app.insert_resource(bevy::winit::WinitSettings {
focused_mode: bevy::winit::UpdateMode::Continuous,
unfocused_mode: bevy::winit::UpdateMode::Continuous,
});
}
app.insert_resource(CaptureMode)
.init_resource::<FrameWatch>()
.insert_resource(CaptureCtx {
@@ -1789,6 +1789,25 @@ pub(super) const ON_DEMAND: &[Scenario] = &[
minute: 720,
ui: None,
},
// MONKEY (perf): Northshire at midnight from the ground — where the owner's night FPS drop is
// reported (torch lanes, lamp fog, bleed fixtures all live). Probe fixtures, not look fixtures.
Scenario {
name: "perf-northshire-night",
map: Some(MAP_AZEROTH),
eye: GROUND_EYE,
look: GROUND_LOOK,
minute: 0,
ui: None,
},
// MONKEY (perf): the abbey front at midnight, close to its lamps and candelabra.
Scenario {
name: "perf-abbey-night",
map: Some(MAP_AZEROTH),
eye: [-8935.0, -145.0, 86.0],
look: [-8905.0, -160.0, 85.0],
minute: 0,
ui: None,
},
];
/// MONKEY (p0 baseline): the Elwynn programme view, above the canopy east of Goldshire looking