fix(wasm,renderer): offset iteration budget by SA skip and floor slice height - #97
Merged
Merged
Conversation
|
Visit the preview URL for this PR (updated for commit 0cdc316): https://fractious-deep--pr97-fix-sa-offset-iterat-hbqm05nd.web.app (expires Mon, 05 Oct 2026 13:35:07 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 348393a9746312ebab7a45ce5eba16e6d119af34 |
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.
Summary
Offset
calc_iterby Series Approximationskip_iter(wasm/src/lib.rs):z = 16.681,skip_iter = 21,311), up to 80% of the initialsearch_limit(27,018) is consumed by the shared pre-rebase prefix before orbits in the viewport even begin to diverge from one another.search_anchorstops as soon as the centre candidate reachessearch_limit, Phase 2 of the anchor search was skipped andcalc_itercapped out at40,527— leaving only ~19k post-skip iterations and clipping the central 4-lobed clover (41k–107kiterations) to solid black.calc_iterbyskip_iter, advance the reference orbit through that post-skip budget, and when an anchor that survivedsearch_limitsubsequently escapes during the+ skip_iterextension, scalecalc_iterto at leastorbit.n + 3 * skip_iter.skip_iter == 0) and periodic bulb interiors (!orbit.escaped) are unaffected.Floor progressive slice height at a 32-row hardware tile strip (
src/Renderer.js):effectiveIteris large (86,197post-skip iterations atz = 16.681), a single GPU thread's sequential loop latency (~50–67 ms) exceedsTARGET_SLICE_MS(32 ms).nextRows = ceil(prevRows * 32 / elapsedMs)decayed exponentially (52 -> 21 -> 11 -> 6 -> 4 -> 2 -> 1 row), starving the GPU's parallel shader lanes while still paying the full single-thread serial latency and full-screen post-pass blit on every 1-row slice (27.4 sacross411slices on Pixel 11)._sliceRowsatMIN_SLICE_ROWS(32rows, one32x32mobile TBDR hardware tile strip, capped byremaining), cutting the full-resolution1078x2008render atiter = 107,508on the Pixel 11 from 27.4 s (411slices) to 3.19 s (48slices, 8.6x faster).