Public uniforms table, same shape as PointMaterial.uniforms.
PrivatetslPrivate Optional_Explicit depthTest / transparent overrides from the constructor
config. Every rebuildGraph() re-applies the factory tail's
MODE-DERIVED blending state (depthTest/transparent included), so an
override honored only once in the constructor tail would silently
revert on the first later rebuild (e.g. the guaranteed
placeholder→real updatePointTexture rebuild at first commit). The
GLSL twin never rebuilds, so its constructor-tail overrides stick;
persisting them here and re-applying at the end of rebuildGraph
keeps the two backends contract-identical. An explicit later
applyBlendingMode() call CLEARS both (a runtime mode switch takes
full ownership of the blending state — matching the GLSL twin,
where applyBlendingStateToMaterial overwrites both fields
unconditionally).
Private Optional_PrivaterebuildRefresh the colormap TSL nodes so they bind to the current
this.uniforms.uColormap*.value. TextureNode is bound to a
specific Texture instance at construction; a texture swap
requires a fresh node, hence this lives in rebuildGraph().
Mirrors LineTSLMaterial.rebuildColormapNodes.
PrivaterebuildRe-run the TSL factory and attach the resulting vertexNode /
colorNode + blending state to ourselves. Called from the
constructor and from updateColormapTexture when the
colormap state changes (the colormap branch is gated on a
JS-side if, so the graph itself changes shape; TSL's
texture() captures the Texture object at factory-call time
so a swap also requires a rebuild).
Drives useColormap from defines.USE_COLORMAP — the same
source of truth the GLSL wrapper uses. Probing
!!this.uniforms.uColormapTex would be wrong because
setColormapTexture(null) keeps the IUniform object around
with .value = null (mirroring PointMaterial's behaviour); the
uniform existence outlives the colormap-enabled state.
CameraAwareMaterial. Same body shape as PointMaterial: mutate
this.uniforms.X.value; the writes land directly on the
wrapper-owned TSL uniform nodes via the proxyIUniform bridges.
The projection terms are read in the graph from
cameraProjectionMatrix, so _isOrtho is accepted and ignored.
OptionalnearCull: numberCurrent opacity multiplier (the LOD cross-fade snapshots this as its fade base).
Private_Same toggle helper as PointMaterial._refreshNoGOGDefine — see there.
Update the volumetric absorption coefficient κ (composed node
attr). Plain runtime uniform — no graph rebuild. Mirrors
GSplatTSLMaterial.updateAbsorption.
Current volumetric absorption κ (mirrors GSplatMaterial.getAbsorption).
Flag whether the committed colors carry a real per-point alpha
column (RGBA). Deliberately a uniform, not a define — toggling it
never rebuilds the graph. Mirrors
GSplatTSLMaterial.updateHasElementAlpha.
Rebind the point data texture. TSL texture() captures the
THREE.Texture at factory time, so an identity change needs a
fresh node + graph rebuild (exact mirror of
GSplatTSLMaterial.updateSplatTexture and the colormap texture
lifecycle). No-op when the texture is unchanged — the common
per-commit case.
The currently bound point data texture.
Toggle the colormap branch. Rebuild the graph whenever the colormap state actually changes — either an on/off flip OR a texture-identity swap.
TSL's texture(value, …) captures the Texture object passed to
it at factory-call time; subsequent mutations to
iuniform.value don't re-route the underlying TextureNode. So a
swap (old non-null → new non-null) needs a graph rebuild too,
not just the enable/disable transitions. The GLSL wrapper gets
away with a single material.uniforms.uColormapTex.value = texture write because ShaderMaterial reads the IUniform by
reference at render time.
Returns a new material with copied values from this instance.
A clone of this instance.
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 rendered via TSL / NodeMaterial.
Designed to satisfy the same surface as
PointMaterialso the dispatch inMaterialManager.getPointMaterialis a drop-in. The class extendsNodeMaterial(the WebGPU/WebGL-2-fallback-aware material type) instead ofTHREE.ShaderMaterial.