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)

islandmed0a7066a02794
diff --git a/src/app/App.cpp b/src/app/App.cpp
index 02d0cf54..ea0e8afd 100644
--- a/src/app/App.cpp
+++ b/src/app/App.cpp
@@ -983,6 +983,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 9189afd5..aab72eff 100644
--- a/src/app/App.h
+++ b/src/app/App.h
@@ -2060,6 +2060,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() {