Create a new LineMaterial with the specified configuration.
Material configuration options
Update camera parameters for world-space line sizing. The pixel-width
scale is read in shader from the projection matrix (luxarLineScale);
isOrtho still drives the uIsOrtho uniform the vertex AND fragment
stages branch on.
Viewport resolution
OptionalnearCull: numberRebind the line 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
PointMaterial.updatePointTexture; null falls back to the
shared placeholder so the sampler is never unbound.
The currently bound line data texture.
Update 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() path is
recompiled in/out. The Three.js shader-program cache rebuilds the
program on needsUpdate = true.
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).
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 PointMaterial.updateAbsorption.
Current volumetric absorption κ (mirrors GSplatMaterial.getAbsorption).
Flag whether the committed colors carry a real per-endpoint alpha
column (RGBA). Set per-commit by syncLineMaterialWithGeometry;
gates only the volumetric w(a) optical-depth map. Mirrors
PointMaterial.updateHasElementAlpha.
Update the colormap texture and enable/disable colormap mode.
Set the scalar data range for colormap normalization.
Clone this material.
Apply a Luxar blending mode to this material in-place.
Draws the complete THREE state from the shared
getCompleteBlendingState — the same source of truth the Point
and GSplat wrappers and the TSL twin use — so creation-time wiring,
runtime UI transitions, and both backends can never disagree on
blend factors, depth state, or transparency.
Sets the LUXAR_MAX_RGB_CONTRIBUTION shader define for max mode
so the fragment premultiplies RGB by intensity*opacity (required
because MaxEquation+OneFactor doesn't multiply by alpha at
composite time). 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).
Line material using instanced quads with semicircle kernel rendering.
The semicircle kernel produces parabolic intensity profiles that sum correctly at joints when using additive blending: