Skip to content

Fire GSplatSorter 'updated' event immediately for renderNextFrame support#8500

Merged
mvaligursky merged 1 commit intomainfrom
fix-gsplat-sorter-deferred-event
Mar 4, 2026
Merged

Fire GSplatSorter 'updated' event immediately for renderNextFrame support#8500
mvaligursky merged 1 commit intomainfrom
fix-gsplat-sorter-deferred-event

Conversation

@mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Mar 4, 2026

Summary

  • Moves the 'updated' event in GSplatSorter from applyPendingSorted() to the worker message callback, so listeners are notified as soon as sort results arrive. This ensures renderNextFrame is triggered promptly when autoRender is disabled, avoiding a one-frame delay.
  • Changes applyPendingSorted() to return the splat count instead of firing an event with it. GSplatInstance.update() uses the return value directly to set instancingCount and the numSplats material parameter.

…port

Move the 'updated' event from applyPendingSorted() to the worker message
callback so listeners are notified as soon as sort results arrive. This
ensures renderNextFrame is triggered promptly when autoRender is disabled.

The splat count is now returned from applyPendingSorted() instead of being
passed via the event, and GSplatInstance.update() applies it directly.

Made-with: Cursor
@mvaligursky mvaligursky requested a review from slimbuck March 4, 2026 14:11
@mvaligursky mvaligursky self-assigned this Mar 4, 2026
@mvaligursky mvaligursky added the area: graphics Graphics related issue label Mar 4, 2026
@mvaligursky mvaligursky merged commit 693abb9 into main Mar 4, 2026
8 checks passed
@mvaligursky mvaligursky deleted the fix-gsplat-sorter-deferred-event branch March 4, 2026 14:15
mvaligursky added a commit that referenced this pull request Mar 4, 2026
…port (#8500)

Move the 'updated' event from applyPendingSorted() to the worker message
callback so listeners are notified as soon as sort results arrive. This
ensures renderNextFrame is triggered promptly when autoRender is disabled.

The splat count is now returned from applyPendingSorted() instead of being
passed via the event, and GSplatInstance.update() applies it directly.

Made-with: Cursor

Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant