GaussianSplatsMaterial

@three-blocks/coreWebGPU
new GaussianSplatsMaterial(splats : GaussianSplats, options : Object)
Extends
NodeMaterial

Custom NodeMaterial for rendering Gaussian Splats.

This material handles:

  • Billboard quad generation from sorted splat indices
  • Ellipse computation from 2D covariance matrix
  • Gaussian alpha falloff evaluation
  • Proper alpha blending for transparency
Constructor Parameters
splatsGaussianSplats
The GaussianSplats instance.
optionsoptionalObject
Material options.
Default is {}.
  • lightingModeoptionalstring
    Lighting mode: 'unlit' (DC+SH combined, no PBR) or 'lit' (DC as diffuse albedo, SH as specular color).
    Default is 'unlit'.
  • alphaClipoptionalnumber
    Base opacity threshold - entire splats with opacity below this are culled (0 = disabled).
    Default is 0.05.
  • minPixelRadiusoptionalnumber
    Minimum splat radius in pixels - splats smaller than this are culled (removes noise).
    Default is 2.0.
  • maxPixelRadiusoptionalnumber
    Maximum splat radius in pixels - prevents huge splats from dominating.
    Default is 1000.
  • globalOpacityoptionalnumber
    Global opacity multiplier for all splats (0.0 to 1.0).
    Default is 1.0.
  • sigmaCoverageoptionalnumber
    Sigma multiplier for splat quad size (2.0 = SuperSplat default).
    Default is 2.0.
  • adaptiveSigmaoptionalboolean
    Enable adaptive sigma - reduces quad size for small splats to reduce overdraw.
    Default is true.
  • adaptiveSigmaThresholdoptionalnumber
    Threshold in pixels for adaptive sigma - splats below this get reduced quads.
    Default is 8.0.
  • srgbToLinearoptionalboolean
    Convert splat colors from sRGB to linear color space.
    Default is false.
  • exposureoptionalnumber
    Exposure/brightness multiplier (0.1 to 3.0).
    Default is 1.0.
  • contrastoptionalnumber
    Contrast adjustment (0.5 = flat, 1.0 = normal, 2.0 = high).
    Default is 1.0.
  • saturationoptionalnumber
    Color saturation (0 = grayscale, 1 = normal, 2 = oversaturated).
    Default is 1.0.
  • vibranceoptionalnumber
    Selective saturation for muted colors (-1 to 1).
    Default is 0.0.
  • highlightsoptionalnumber
    Highlight adjustment (-1 to 1).
    Default is 0.0.
  • shadowsoptionalnumber
    Shadow lift adjustment (-1 to 1).
    Default is 0.0.
  • shStrengthoptionalnumber
    SH strength - controls view-dependent color intensity (0=flat, 1=normal, >1=exaggerated).
    Default is 1.0.
  • shSpecularIntensityoptionalnumber
    SH specular intensity for lit mode - scales SH contribution in specular path (0=no specular, 1=normal).
    Default is 1.0.
  • roughnessoptionalnumber
    Surface roughness for lit mode PBR (0=mirror, 1=fully rough).
    Default is 0.5.
  • metalnessoptionalnumber
    Surface metalness for lit mode PBR (0=dielectric, 1=metal).
    Default is 0.0.
  • alphaBoostoptionalnumber
    Alpha boost - increases opacity via power function (1=normal, >1=more opaque, reduces see-through).
    Default is 1.0.
  • premultipliedoptionalboolean
    Premultiply color by alpha in unlit mode (required for standard alpha blending).
    Default is false.

Properties

.isGaussianSplatsMaterial :

Flag for type checking.

.customPositionNode :

Custom position modifier node - takes (position, splatIdx) returns modified position

.lightingMode :

Get the current lighting mode.

.lightingMode :

Set the lighting mode.

  • 'unlit': DC + SH combined as emissive (no PBR lighting, default)
  • 'lit': DC as diffuse albedo (colorNode), SH as specular color (specularColorNode) In lit mode, DC receives diffuse lights and envmap, while SH drives specular highlights.

.alphaClip :

Get the current alpha clip threshold.

.alphaClip :

Set the alpha clip threshold for per-splat culling. Splats with base opacity below this value are entirely discarded. Higher values = fewer outlier splats but may lose detail. Lower values = more detail but may show stray splats.

.minPixelRadius :

Get the minimum pixel radius for splats.

.minPixelRadius :

Set the minimum pixel radius for splats. Splats smaller than this are culled to remove noise.

.maxPixelRadius :

Get the maximum pixel radius for splats.

.maxPixelRadius :

Set the maximum pixel radius for splats. Prevents extremely large splats from dominating the scene.

.globalOpacity :

Get the global opacity multiplier.

.globalOpacity :

Set the global opacity multiplier. Scales all splat opacities uniformly.

.sigmaCoverage :

Get the sigma coverage value.

.sigmaCoverage :

Set the sigma coverage for splat quad size. Controls how many standard deviations the quad covers.

  • 2.0: SuperSplat default (optimal visual quality)
  • 3.0: Standard 3DGS (covers 99.7% of Gaussian, more overdraw)

.adaptiveSigma :

Get whether adaptive sigma is enabled. When enabled, small splats get reduced quad size to minimize overdraw.

.adaptiveSigma :

Set whether adaptive sigma is enabled. When enabled, splats smaller than adaptiveSigmaThreshold get reduced quad size. This reduces overdraw for scenes with many small splats.

.adaptiveSigmaThreshold :

Get the adaptive sigma threshold in pixels.

.adaptiveSigmaThreshold :

Set the adaptive sigma threshold in pixels. Splats with screen radius below this threshold get progressively smaller quads.

.exposure :

Get the current exposure value.

.exposure :

Set the exposure (brightness multiplier).

.contrast :

Get the current contrast value.

.contrast :

Set the contrast adjustment.

.saturation :

Get the current saturation value.

.saturation :

Set the saturation adjustment.

.vibrance :

Get the current vibrance value.

.vibrance :

Set the vibrance (selective saturation for muted colors).

.highlights :

Get the current highlights adjustment.

.highlights :

Set the highlights adjustment.

.shadows :

Get the current shadows adjustment.

.shadows :

Set the shadows adjustment (lift dark areas).

.shStrength :

Get the SH strength multiplier.

.shStrength :

Set the SH strength - controls view-dependent color intensity.

.alphaBoost :

Get the alpha boost value.

.alphaBoost :

Set the alpha boost - increases splat opacity via power function. Higher values make splats more opaque, reducing see-through artifacts.

.shSpecularIntensity :

Get the SH specular intensity for lit mode.

.shSpecularIntensity :

Set the SH specular intensity for lit mode. Controls how much SH contributes to specular highlights.

.roughness :

Get the surface roughness for lit mode PBR.

.roughness :

Set the surface roughness for lit mode PBR.

.metalness :

Get the surface metalness for lit mode PBR.

.metalness :

Set the surface metalness for lit mode PBR.

.premultiplied :

Get whether color premultiplication is enabled.

.premultiplied :

Set whether to premultiply color by alpha in unlit mode. When true (default), colors are multiplied by opacity for correct alpha blending. Set to false if using custom blend modes that expect non-premultiplied colors.

Methods

applyPreset#

applyPreset(presetName : string)

Apply a preset configuration.

Parameters
presetNamestring
Name of the preset (e.g., 'CINEMATIC', 'VIBRANT').

dispose#

dispose()

Dispose of material resources.