Create a new GSplatMaterial with the specified configuration.
Material configuration options
Update the viewport-dependent uniforms. The projection terms (screen
centre, covariance Jacobian, ortho test) are read in shader from the
projection matrix, so _isOrtho is accepted and ignored.
Viewport resolution
OptionalnearCull: numberUpdate opacity.
Current opacity multiplier (the LOD cross-fade snapshots this as its fade base).
Update the absorption coefficient κ (volumetric mode only — a plain uniform write, no recompile; inert in every other mode).
Current absorption coefficient κ.
Declare whether the committed dataset's colors carry a per-splat alpha channel (RGBA). Plain uniform write — set by the commit layer once the color layout is known.
Update truncation radius and recompute shifted Gaussian parameters.
Update max extent factor (projected splat size limit as fraction of viewport). Lower values = more aggressive culling of close/large splats (better perf). Default 0.33 means fade starts when a splat fills ~1/3 of the viewport.
Update gamma correction. Only invGamma is used in shader; gamma value stored in userData for clone()
When gamma crosses the 1.0 threshold (with epsilon), toggle the
LUXAR_GAMMA_ONE define so the fragment shader's pow() fast path is
recompiled in/out (mirrors the Line material).
Private_Toggle the LUXAR_NO_GOG define based on the live uniform values
for intensity + offset. Called by both updateIntensity and
updateOffset because the flag depends on both values jointly.
Returns true if the define changed (caller may need a rebuild).
Mirrors LineMaterial._refreshNoGOGDefine.
Update intensity (linear color multiplier)
Update offset (additive brightness shift)
Rebind the splat data texture (pool acquire may hand the node a different geometry+texture pair on growth or best-fit reuse). Plain uniform update — no shader recompilation involved.
The currently bound splat data texture (mirrors getPointTexture/getLineTexture).
Update the colormap texture and enable/disable colormap mode.
Colormap LUT texture (256x1 RGB), or null to disable
Set the scalar data range for colormap normalization.
Minimum scalar value (maps to LUT index 0)
Maximum scalar value (maps to LUT index 255)
Clone this material.
Apply a blending mode to this material in-place.
GSplat-specific because the method sets the uProjectionMode
uniform — PEAK (1) for the surface modes (max / normal /
opaque, see usesPeakProjection), SUM ray-integral (0) for
emissive (additive/luminous/volumetric) — and owns the
LUXAR_NORMAL_PREMULT + LUXAR_VOLUMETRIC define lifecycles. Without a type-specific method,
the layers panel's generic mat.blending = state.blending would leave a
stale uProjectionMode while the framebuffer blend state changed —
physically wrong projection.
normal is gsplat-specific too: the shader emits premultiplied
coverage alpha under the LUXAR_NORMAL_PREMULT define (toggled
here, alongside the LUXAR_VOLUMETRIC define for the
emission–absorption branch), paired with
getGSplatNormalBlendingState()'s One / OneMinusSrcAlpha state.
Used by both the constructor and runtime mode changes from the
layers panel. After this returns, userData.blendingMode reflects
the live mode so subsequent clone() calls preserve it.
Bind a colormap LUT texture (or null to disable colormap mode).
When texture is non-null, the USE_COLORMAP define is added
and the uniforms (uColormapTex, uScalarMin, uScalarScale)
are allocated with neutral defaults if they don't exist yet.
When texture is null, the define is removed and the uniform
values are cleared so a subsequent clone() doesn't resurrect
a stale colormap.
No-op when called on a material whose shader path doesn't
include USE_COLORMAP-guarded uniforms.
Update the scalar range [min, max] the colormap maps over.
Encoded as uScalarMin = min and uScalarScale = 1/max(1e-10, max-min)
for the shader. No-op when colormap mode is not active (uniforms
are absent until setColormapTexture has been called once).
GSplat material for volumetric Gaussian splatting.
Each splat is rendered as an oriented quad expanded based on the 2D projected covariance eigenvalues. The fragment shader evaluates the Gaussian density using Mahalanobis distance from the projected center.