Skip to content

Expose GSplat rendering properties on GSplatParams#8518

Merged
mvaligursky merged 2 commits intomainfrom
mv-gsplat-rendering-props
Mar 11, 2026
Merged

Expose GSplat rendering properties on GSplatParams#8518
mvaligursky merged 2 commits intomainfrom
mv-gsplat-rendering-props

Conversation

@mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Mar 10, 2026

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:

  • Replace hardcoded 2-pixel splat cutoff in vertex shader with configurable minPixelSize uniform (GLSL + WGSL)
  • Add alphaClip, minPixelSize, antiAlias, and twoDimensional properties to GSplatParams
  • Set minPixelSize default (2.0) on non-unified material for backward compatibility
  • Remove redundant alphaClip default from GSplatRenderer (now flows from GSplatParams)

API Changes:

  • app.scene.gsplat.alphaClip (number, default 0.3) — alpha threshold for shadow/pick/prepass passes
  • app.scene.gsplat.minPixelSize (number, default 2) — minimum screen-space pixel size before splats are culled
  • app.scene.gsplat.antiAlias (boolean, default false) — enables anti-aliasing compensation
  • app.scene.gsplat.twoDimensional (boolean, default false) — enables 2D Gaussian Splatting mode

Examples:

  • Added minPixelSize slider to LOD streaming example
  • Added alphaClip slider to shadows example (new controls file)
  • Updated flipbook and shadows examples to use new alphaClip API

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
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 minPixelSize uniform (GLSL/WGSL).
  • Add alphaClip, minPixelSize, antiAlias, and twoDimensional properties to GSplatParams and 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
@mvaligursky mvaligursky merged commit 4e34b40 into main Mar 11, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-gsplat-rendering-props branch March 11, 2026 10:48
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.

gaussians smaller than 2 pixels are clipping

2 participants