Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

Floor tier: view resolution 75% while the view moves (SF_MOTION_RESOLUTION)

islandmeda45b06bd9e6d
diff --git a/docs/design/perf-moonshots.md b/docs/design/perf-moonshots.md
index 6abdfafc..3ccd2aff 100644
--- a/docs/design/perf-moonshots.md
+++ b/docs/design/perf-moonshots.md
@@ -38,8 +38,8 @@ this; an experiment that misses it stays off for that tier or doesn't ship.
profile is applied, so it is the same code a real floor machine runs): Laptop tier; 4 worker threads;
render triangle budget 2M (1M while the view moves); motion proxy from 3M visible triangles; upload budget
16 MB a frame; no GL 4.4 buffer storage (Fast Upload falls back); resident caches capped at 1 GB; the governor
-may lower the budget, never raise it. Still to add: view resolution 75% while the view moves (only a fixed view
-resolution exists today).
+may lower the budget, never raise it. View resolution 75% while the view moves, full
+when it stops (`SF_MOTION_RESOLUTION=25..100` sets it on any profile).
**Frame split.** `--benchmark` now writes `frame_split_ms` per phase (p50 / p95 / p99 of the main thread's
events, sculpt, UI, upload = ghost + scene sync, draw = GL calls, swap_wait = UI draw + swap, where the frame
diff --git a/src/app/App.cpp b/src/app/App.cpp
index 78944a10..7dc45f15 100644
--- a/src/app/App.cpp
+++ b/src/app/App.cpp
@@ -985,6 +985,8 @@ int App::run() {
renderSettings_.motionProxy = perf_.proxyNow; // big meshes draw their lighter proxy while the view moves
renderSettings_.materialTint = materialTintFor(doc_.paintColor); // (Color > Colour tints the material)
renderSettings_.resolutionScale = float(uiPrefs_.viewResolution) / 100.0f; // (#80; only the window's view)
+ if (perf_.movingNow) // while the view moves, the floor tier draws fewer pixels; full resolution when it stops
+ renderSettings_.resolutionScale = std::min(renderSettings_.resolutionScale, motionResolution());
perf_.samplesUsed = renderer_.drawView(camera_, fbW, fbH, renderSettings_, canvasViewport(fbW, fbH), samples);
if (snapshotEnv && *snapshotEnv && (sm.moving || sm.releasing)) {
// Three points of the stroke, and the end (the frame the last dab reached the screen).
diff --git a/src/app/App.h b/src/app/App.h
index f33d560d..ddf23703 100644
--- a/src/app/App.h
+++ b/src/app/App.h
@@ -2071,6 +2071,9 @@ private:
// The last drawn frame's time by part (run()'s marks): events, dabs, UI, ghost + scene sync (the upload), draw,
// UI draw + swap (where the frame waits for the GPU).
double frameSplitMs_[6] = {};
+ // The view's resolution while it moves (experimental, docs/design/perf-moonshots.md §0): 0.75 on the simulated
+ // floor tier (SF_HW_SIMULATE=floor), else 1; SF_MOTION_RESOLUTION=25..100 (percent) overrides.
+ static float motionResolution();
void drawTimelineUi(); // once a frame from drawUi: keeps the timeline attached and draws the strip
float timelineTopInset_ = 0.0f; // how far down the canvas the strip (or its tab) reaches at the top; 0 at the bottom
float timelineStripY_ = -1.0f; // the strip's (or tab's) top edge in window pixels this frame (-1: not shown)
diff --git a/src/app/PanelPerformanceProfile.cpp b/src/app/PanelPerformanceProfile.cpp
index 7d564894..278b8bc8 100644
--- a/src/app/PanelPerformanceProfile.cpp
+++ b/src/app/PanelPerformanceProfile.cpp
@@ -99,6 +99,14 @@ int displayRefreshHz(SDL_Window* window) {
} // namespace
+float App::motionResolution() {
+ static const float scale = [] {
+ if (const char* v = std::getenv("SF_MOTION_RESOLUTION"); v && *v) return std::clamp(float(std::atof(v)) / 100.0f, 0.25f, 1.0f);
+ return simulatedFloorTier() ? 0.75f : 1.0f;
+ }();
+ return scale;
+}
+
bool App::hardwareProfileGoverns() const { return hwProfile_ && hwProfile_->active; }
void App::initHardwareProfile() {