From 513d5eaea7310ba72692c3ae59fd9e2e28e74e54 Mon Sep 17 00:00:00 2001 From: nazar-gavrylyk Date: Tue, 10 Nov 2026 15:10:24 +0100 Subject: [PATCH] Preview: Lower Resolution When Playback Can't Keep Up is off by default It never steps back up during a play, so a looping preview kept playing at a quarter of its resolution after its first loop. Without it the paced first loop caches the viewer's resolution and the next loops play in real time, as in After Effects. The setting stays for whoever prefers a lower first pass. --- crates/engine/src/settings/prefs/sections.rs | 7 +++++-- crates/ui-egui/tests/it/ui_preview_align.rs | 4 +++- docs/preferences.md | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/crates/engine/src/settings/prefs/sections.rs b/crates/engine/src/settings/prefs/sections.rs index ee86ce4c4..ca0e72bef 100644 --- a/crates/engine/src/settings/prefs/sections.rs +++ b/crates/engine/src/settings/prefs/sections.rs @@ -93,8 +93,11 @@ page!(Previews { /// Largest downsampling while playing back: `1/2`, `1/4`, `1/8`. adaptive_resolution_limit: String = "1/8".into(), /// A preview at Resolution Auto that renders slower than real time steps down a resolution - /// (½, then ¼, no further than the Adaptive Resolution Limit) for the rest of that play. - adaptive_playback: bool = true, + /// (½, then ¼, no further than the Adaptive Resolution Limit) for the rest of that play. Off + /// by default: it never steps back up during a play, so a looping preview kept playing at ¼ + /// after its first loop, where without it the first loop caches Full and the next ones play + /// in real time at Full, as in After Effects. + adaptive_playback: bool = false, show_internal_wireframes: bool = false, cache_frames_when_idle: bool = true, fast_previews: bool = false, diff --git a/crates/ui-egui/tests/it/ui_preview_align.rs b/crates/ui-egui/tests/it/ui_preview_align.rs index 6b5525e09..9d3119b21 100644 --- a/crates/ui-egui/tests/it/ui_preview_align.rs +++ b/crates/ui-egui/tests/it/ui_preview_align.rs @@ -322,7 +322,7 @@ fn cache_frames_when_idle_survives_an_inverted_work_area() { /// Settings ▸ Previews ▸ Lower Resolution When Playback Can't Keep Up: a preview at Auto that /// stalls for two seconds steps down to half its scale, two more to a quarter; an explicit Resolution and -/// the pref turned off keep the scale, and stopping goes back to the viewer's. +/// the pref turned off (its default) keep the scale, and stopping goes back to the viewer's. #[test] fn playback_that_cannot_keep_up_steps_down_a_resolution() { let stall = |h: &mut Harness<'_, EffectcraftApp>, secs: f64| { @@ -338,6 +338,8 @@ fn playback_that_cannot_keep_up_steps_down_a_resolution() { assert!(h.state().playback.playing); }; let mut h = harness(); + assert!(!h.state().session.prefs.previews.adaptive_playback, "off by default"); + h.state_mut().session.prefs.previews.adaptive_playback = true; // No room in the RAM preview: frames never stay cached and every pass stalls, as with a comp // too heavy to render in real time. h.state().frames.set_budget(0); diff --git a/docs/preferences.md b/docs/preferences.md index cad74aec2..07df169aa 100644 --- a/docs/preferences.md +++ b/docs/preferences.md @@ -53,7 +53,9 @@ Commands (CLI, MCP, control channel): - `composition.showRenderingProgress`: Show Rendering Progress in Info Panel and Flowchart - `previews.adaptiveResolutionLimit`: Adaptive Resolution Limit (the lowest resolution Fast Previews ▸ Adaptive Resolution drops to while you drag, and the lowest a playing preview steps down to) -- `previews.adaptivePlayback`: Lower Resolution When Playback Can't Keep Up. On by default. A +- `previews.adaptivePlayback`: Lower Resolution When Playback Can't Keep Up. Off by default (without it a first play renders + at the viewer's resolution at the rate frames arrive, and a looping preview plays its later loops + from the cache in real time, as in After Effects; with it the play stays lowered). A preview at Resolution Auto that plays under 80 % of its frame rate (frames render slower than that, so it plays them at the rate they arrive rather than freezing between them) steps down a resolution (half the scale after two seconds, a quarter two seconds later if still slow,