Skip to content

Add gsplat shader rings example using the gsplatModifyPS hook#8877

Merged
mvaligursky merged 1 commit into
mainfrom
mv-shader-rings
Jun 11, 2026
Merged

Add gsplat shader rings example using the gsplatModifyPS hook#8877
mvaligursky merged 1 commit into
mainfrom
mv-shader-rings

Conversation

@mvaligursky

Copy link
Copy Markdown
Contributor

Adds a minimal example demonstrating the gsplatModifyPS fragment chunk added in #8872, and fixes a WGSL uniformity issue that prevented user chunks from using derivatives.

Changes:

  • The WGSL gsplat fragment shader no longer early-returns after its discards in the forward path. The conditional returns made control flow non-uniform, causing WebGPU validation errors for any user gsplatModifyPS chunk calling derivative builtins (fwidth, dpdx, ...). WGSL discard demotes the invocation to a helper, so dropping the returns preserves semantics while keeping control flow uniform.

Examples:

  • New gaussian-splatting/shader-rings example: each splat of the skull scene is rendered as a sharp ring of its own color. The fragment chunk uses gaussianUV for the ring shape, fwidth to keep the ring a constant screen-space pixel width at any zoom, and a screen-position-phased sin curve so a highlight wave travels across the rings. Ring width (in pixels) and ring alpha are exposed as sliders, shaders live in separate .frag files, and spherical harmonics colors update every degree of camera movement.

@mvaligursky mvaligursky self-assigned this Jun 11, 2026
@mvaligursky mvaligursky merged commit 50d3bdb into main Jun 11, 2026
9 checks passed
@mvaligursky mvaligursky deleted the mv-shader-rings branch June 11, 2026 18:18
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