Skip to content

fix(gsplat): apply material changes made in frame:ready the same frame#8830

Merged
mvaligursky merged 1 commit into
mainfrom
mv-gsplat-frameready-material-sync
Jun 3, 2026
Merged

fix(gsplat): apply material changes made in frame:ready the same frame#8830
mvaligursky merged 1 commit into
mainfrom
mv-gsplat-frameready-material-sync

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

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. As a result the GSPLAT_AA define (and other material defines/params) set from frame:ready never reached the quad renderer's rendering material, on both WebGL and WebGPU.

Changes:

  • In GSplatManager.update(), move the renderer frameUpdate() call to after fireFrameReadyEvent() so material state mutated by frame:ready listeners is synced and applied the same frame. frameUpdate only prepares render-time state consumed during the subsequent draw/dispatch, so running it last is safe for all renderer paths (quad/hybrid/compute).

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 mvaligursky self-assigned this Jun 3, 2026
@mvaligursky mvaligursky merged commit a3455be into main Jun 3, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-gsplat-frameready-material-sync branch June 3, 2026 11:22
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant