GaussianSplatsMaterial
new GaussianSplatsMaterial(splats : GaussianSplats, options : Object)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
splatsGaussianSplatsoptionsoptionalObjectDefault is
{}.lightingModeoptionalstringLighting mode: 'unlit' (DC+SH combined, no PBR) or 'lit' (DC as diffuse albedo, SH as specular color).
Default is'unlit'.alphaClipoptionalnumberBase opacity threshold - entire splats with opacity below this are culled (0 = disabled).
Default is0.05.minPixelRadiusoptionalnumberMinimum splat radius in pixels - splats smaller than this are culled (removes noise).
Default is2.0.maxPixelRadiusoptionalnumberMaximum splat radius in pixels - prevents huge splats from dominating.
Default is1000.globalOpacityoptionalnumberGlobal opacity multiplier for all splats (0.0 to 1.0).
Default is1.0.sigmaCoverageoptionalnumberSigma multiplier for splat quad size (2.0 = SuperSplat default).
Default is2.0.adaptiveSigmaoptionalbooleanEnable adaptive sigma - reduces quad size for small splats to reduce overdraw.
Default istrue.adaptiveSigmaThresholdoptionalnumberThreshold in pixels for adaptive sigma - splats below this get reduced quads.
Default is8.0.srgbToLinearoptionalbooleanConvert splat colors from sRGB to linear color space.
Default isfalse.exposureoptionalnumberExposure/brightness multiplier (0.1 to 3.0).
Default is1.0.contrastoptionalnumberContrast adjustment (0.5 = flat, 1.0 = normal, 2.0 = high).
Default is1.0.saturationoptionalnumberColor saturation (0 = grayscale, 1 = normal, 2 = oversaturated).
Default is1.0.vibranceoptionalnumberSelective saturation for muted colors (-1 to 1).
Default is0.0.highlightsoptionalnumberHighlight adjustment (-1 to 1).
Default is0.0.shadowsoptionalnumberShadow lift adjustment (-1 to 1).
Default is0.0.shStrengthoptionalnumberSH strength - controls view-dependent color intensity (0=flat, 1=normal, >1=exaggerated).
Default is1.0.shSpecularIntensityoptionalnumberSH specular intensity for lit mode - scales SH contribution in specular path (0=no specular, 1=normal).
Default is1.0.roughnessoptionalnumberSurface roughness for lit mode PBR (0=mirror, 1=fully rough).
Default is0.5.metalnessoptionalnumberSurface metalness for lit mode PBR (0=dielectric, 1=metal).
Default is0.0.alphaBoostoptionalnumberAlpha boost - increases opacity via power function (1=normal, >1=more opaque, reduces see-through).
Default is1.0.premultipliedoptionalbooleanPremultiply color by alpha in unlit mode (required for standard alpha blending).
Default isfalse.
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
presetNamestringdispose#
dispose()Dispose of material resources.