Expose GSplat rendering properties on GSplatParams#8518
Merged
mvaligursky merged 2 commits intomainfrom Mar 11, 2026
Merged
Conversation
Add alphaClip, minPixelSize, antiAlias, and twoDimensional properties to GSplatParams for unified mode. Replace hardcoded 2-pixel splat size cutoff with configurable minPixelSize uniform. Fixed #8437 Made-with: Cursor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR exposes several GSplat rendering controls via GSplatParams (app.scene.gsplat) for unified Gaussian Splatting, including making the “2px cutoff” culling threshold configurable via a new minPixelSize uniform (GLSL + WGSL), and updates examples to use the new API.
Changes:
- Replace hardcoded “< 2px” splat early-out in GSplat corner vertex code with a configurable
minPixelSizeuniform (GLSL/WGSL). - Add
alphaClip,minPixelSize,antiAlias, andtwoDimensionalproperties toGSplatParamsand align unified renderer defaults with those params. - Update examples (and add new shadows controls) to drive GSplat settings through
app.scene.gsplat.*.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/scene/shader-lib/wgsl/chunks/gsplat/vert/gsplatCorner.js | Adds minPixelSize uniform and uses it for small-splat early-out in WGSL. |
| src/scene/shader-lib/glsl/chunks/gsplat/vert/gsplatCorner.js | Same minPixelSize uniform + early-out change for GLSL. |
| src/scene/gsplat/gsplat-instance.js | Sets minPixelSize default (2.0) on non-unified materials for backward compatibility. |
| src/scene/gsplat-unified/gsplat-renderer.js | Removes redundant unified renderer alphaClip default (now sourced from params). |
| src/scene/gsplat-unified/gsplat-params.js | Introduces new GSplatParams properties and initializes defaults on the template material. |
| examples/src/examples/gaussian-splatting/shadows.example.mjs | Switches example to use observer-driven app.scene.gsplat.alphaClip. |
| examples/src/examples/gaussian-splatting/shadows.controls.mjs | New UI slider for alpha clip in the shadows example. |
| examples/src/examples/gaussian-splatting/lod-streaming.example.mjs | Adds observer binding to control app.scene.gsplat.minPixelSize. |
| examples/src/examples/gaussian-splatting/lod-streaming.controls.mjs | Adds UI slider for min pixel size. |
| examples/src/examples/gaussian-splatting/flipbook.example.mjs | Updates example to use app.scene.gsplat.alphaClip API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ensures the initial data.set triggers the listener so app.scene.gsplat.alphaClip is applied on startup. 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.
Adds configurable rendering properties to
GSplatParams(app.scene.gsplat) for unified mode, and replaces the hardcoded 2-pixel splat size cutoff with a configurable uniform. Fixes #8437.Changes:
minPixelSizeuniform (GLSL + WGSL)alphaClip,minPixelSize,antiAlias, andtwoDimensionalproperties toGSplatParamsminPixelSizedefault (2.0) on non-unified material for backward compatibilityalphaClipdefault fromGSplatRenderer(now flows fromGSplatParams)API Changes:
app.scene.gsplat.alphaClip(number, default 0.3) — alpha threshold for shadow/pick/prepass passesapp.scene.gsplat.minPixelSize(number, default 2) — minimum screen-space pixel size before splats are culledapp.scene.gsplat.antiAlias(boolean, default false) — enables anti-aliasing compensationapp.scene.gsplat.twoDimensional(boolean, default false) — enables 2D Gaussian Splatting modeExamples:
minPixelSizeslider to LOD streaming examplealphaClipslider to shadows example (new controls file)alphaClipAPI