Fix GSplat LOD re-evaluation when params change via frame:ready event#8498
Merged
mvaligursky merged 1 commit intomainfrom Mar 4, 2026
Merged
Fix GSplat LOD re-evaluation when params change via frame:ready event#8498mvaligursky merged 1 commit intomainfrom
mvaligursky merged 1 commit intomainfrom
Conversation
The frame:ready event fires at the end of GSplatManager.update(), but the dirty flag set by event listeners was immediately cleared by frameEnd() before the next update could act on it. This meant changing LOD range in response to streaming completion had no effect until the camera moved. Now, after firing frame:ready, if params were dirtied by listeners, octree instances are marked for LOD re-evaluation so the new range takes effect on the next full update. Also updates the lod-streaming example to demonstrate progressive loading: start with lowest LOD only, then expand to full quality range once the initial low-quality data finishes streaming. Made-with: Cursor
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
frame:readyevent listeners modify GSplat params (e.g.lodRangeMin/lodRangeMax), the dirty flag was immediately cleared byframeEnd()before the next update could act on it. Now, after firingframe:ready, if params were dirtied by listeners, octree instances are marked withneedsLodUpdateso the new range takes effect on the next full update.lod-streamingexample to demonstrate progressive loading — starts with only the lowest quality LOD, then expands to the full quality range once initial streaming completes via theframe:readycallback.Technical Details
The
frame:readyevent fires at the end ofGSplatManager.update(), butGSplatDirectorcallsframeEnd()immediately after all manager updates, clearing the dirty flag before the next frame'supdate()can see it. The fix checks for re-dirtied params after the event fires and setsneedsLodUpdateon all octree instances, which survives across frames and triggers LOD re-evaluation on the next full update.