Single source for the colormap scalar-range → uniform mapping shared by all
six materials (point/line/gsplat × GLSL/TSL).
The shaders sample the LUT at t = clamp((scalar - uScalarMin) * uScalarScale, 0, 1). Historically each material computed uScalarScale = 1/max(1e-10, max-min) inline (12 copies), which sent a DEGENERATE range (min === max —
e.g. a constant scalar attribute, or a producer-stamped [1, 1]scalar_data_range) to t = 0: every element rendered at the very bottom
of the LUT (black, in gray). The identity for a constant scalar is the
MIDPOINT: with scalarMin = min - 0.5 and scalarScale = 1, a constant
scalar === min maps to t = 0.5 — visible and neutral, mirroring the
degenerate display-range identity fix (#631).
Single source for the colormap scalar-range → uniform mapping shared by all six materials (point/line/gsplat × GLSL/TSL).
The shaders sample the LUT at
t = clamp((scalar - uScalarMin) * uScalarScale, 0, 1). Historically each material computeduScalarScale = 1/max(1e-10, max-min)inline (12 copies), which sent a DEGENERATE range (min === max — e.g. a constant scalar attribute, or a producer-stamped[1, 1]scalar_data_range) tot = 0: every element rendered at the very bottom of the LUT (black, ingray). The identity for a constant scalar is the MIDPOINT: withscalarMin = min - 0.5andscalarScale = 1, a constantscalar === minmaps tot = 0.5— visible and neutral, mirroring the degenerate display-range identity fix (#631).