fix(gsplat): apply material changes made in frame:ready the same frame#8830
Merged
Conversation
Material state changed from a frame:ready event listener (e.g. app.scene.gsplat.antiAlias = ...) was silently dropped: the renderer's per-frame material sync ran before the event fired, and frameEnd() cleared the material dirty flag before any later frameUpdate could observe it. Move frameUpdate() to after fireFrameReadyEvent() so such changes are synced and applied the same frame.
mvaligursky
added a commit
that referenced
this pull request
Jun 3, 2026
#8830) Material state changed from a frame:ready event listener (e.g. app.scene.gsplat.antiAlias = ...) was silently dropped: the renderer's per-frame material sync ran before the event fired, and frameEnd() cleared the material dirty flag before any later frameUpdate could observe it. Move frameUpdate() to after fireFrameReadyEvent() so such changes are synced and applied the same frame. Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
mvaligursky
added a commit
that referenced
this pull request
Jun 3, 2026
#8830) Material state changed from a frame:ready event listener (e.g. app.scene.gsplat.antiAlias = ...) was silently dropped: the renderer's per-frame material sync ran before the event fired, and frameEnd() cleared the material dirty flag before any later frameUpdate could observe it. Move frameUpdate() to after fireFrameReadyEvent() so such changes are synced and applied the same frame. Co-authored-by: Martin Valigursky <mvaligursky@snapchat.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.
Material state changed from a
frame:readyevent listener (e.g.app.scene.gsplat.antiAlias = ...) was silently dropped: the renderer's per-frame material sync ran before the event fired, andframeEnd()cleared the material dirty flag before any laterframeUpdatecould observe it. As a result the GSPLAT_AA define (and other material defines/params) set fromframe:readynever reached the quad renderer's rendering material, on both WebGL and WebGPU.Changes:
GSplatManager.update(), move the rendererframeUpdate()call to afterfireFrameReadyEvent()so material state mutated byframe:readylisteners is synced and applied the same frame.frameUpdateonly prepares render-time state consumed during the subsequent draw/dispatch, so running it last is safe for all renderer paths (quad/hybrid/compute).