Repository navigation
GPU budget, performance presets and a system scan - #2
Merged
Merged
Conversation
Lucent used to raise samples per frame until the GPU was saturated, so lowering resolution or bounces only made it pack in more samples. - Work is now scheduled against a GPU budget (share of wall-clock time) with a token bucket; per-sample cost comes from GPU timer queries, or a synced re-measure every 2 s where those are unavailable. - Eco / Balanced / High / Max presets: budget, frame-rate cap, resolution, bounces and a stop-at sample count. Converged scenes stop drawing. - Scan system times the current scene, scales to the full canvas and applies a recommended preset; runs once on first visit, saved to localStorage. - Optional pause when the window loses focus; HUD and stats show GPU load. Measured with Windows GPU counters on an RX 7600: Balanced 44%, Eco 26%, converged 0.3% (previously 84%+). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Lucent kept the GPU at 100% whatever the settings: with the camera still it raised samples per frame until each frame took ~24 ms, so lowering resolution or bounces just let it pack in more samples. Left open in a tab, it never stopped.
What changes
EXT_disjoint_timer_query_webgl2when available, otherwise from a synced re-measure every 2 s.localStorage.Measured
Windows per-process GPU counters (Claude app's GPU process), RX 7600, Showroom at 1280×720:
The scan on this machine: 37.5 ms per full-resolution sample → Balanced (75% resolution, 50% budget, stop at 2048 spp).
Checks
lint,typecheck,test(79, including a scheduler simulation across per-sample costs from 0.5 to 120 ms) andbuildpass locally.Merging deploys GitHub Pages.
🤖 Generated with Claude Code