Create a new PointMaterial with the specified configuration.
Mirrors the constructor pattern in LineMaterial and
GSplatMaterial: derive an initial THREE blending state from
the Luxar blendingMode, hand it to super({...}), then call
applyBlendingMode to apply the canonical state (defines,
depthTest, custom blend factors). One code path drives both
creation and runtime mode changes from the layers panel.
Update the viewport-dependent uniforms for world-space point sizing.
The projection terms (size scale, ortho test) are read in shader from
the projection matrix, so _isOrtho is accepted and ignored.
OptionalnearCull: numberUpdate opacity
Current opacity multiplier (the LOD cross-fade snapshots this as its fade base).
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)
Update the volumetric absorption coefficient κ (composed node
attr). Plain uniform write — inert unless the material is in
volumetric mode. Mirrors GSplatMaterial.updateAbsorption.
Current volumetric absorption κ (mirrors GSplatMaterial.getAbsorption).
Flag whether the committed colors carry a real per-point alpha
column (RGBA). Set per-commit by commit-points-geometry.ts;
gates only the volumetric w(a) optical-depth map. Mirrors
GSplatMaterial.updateHasElementAlpha.
Update radius scale for dtype normalization Use 1/255 for uint8 radii, 1.0 for float radii
Rebind the point 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. Mirrors
GSplatMaterial.updateSplatTexture; null falls back to the
shared placeholder so the sampler is never unbound.
The currently bound point data texture.
Update the colormap texture and enable/disable colormap mode.
Under the instanced-quad rendering path, vertexColors is always false — the shader reads the color (USE_COLORMAP off) or the scalar (USE_COLORMAP on) from the point texture's texels. Only the USE_COLORMAP define flips here, triggering a recompile.
Apply a Luxar blending mode to this material in-place.
Single source of truth for both creation-time wiring (called by
MaterialManager.getPointMaterial) and runtime UI transitions
(called by LayersPanel.applyBlendingStateToMaterial). Without
this method, the LayersPanel generic path forgot to set
blendSrc/blendDst, so a runtime switch additive→max stranded
SrcAlpha factors and produced inconsistent visuals.
Sets the LUXAR_MAX_RGB_CONTRIBUTION shader define for max mode
so the fragment shader premultiplies RGB by falloff/opacity. This
is required because MaxEquation+OneFactor doesn't multiply by
alpha at composite time. Toggling this define triggers a shader
recompilation; that's intentional and only happens on actual mode
transitions (idempotent — see userData.blendingMode early exit).
Set the scalar data range for colormap normalization.
Clone this material with optional config overrides Override base class clone to return PointMaterial type
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).
Points material with physically accurate world-space sizing. Extends THREE.ShaderMaterial to provide specialized point rendering.