Coerce a (possibly quantized) color buffer to Float32 in [0, 1].
F32 inputs are assumed pre-normalized and pass through unchanged;
Uint8 inputs are scaled by 1/255; Uint16 inputs are scaled by
1/65535.
The downstream WASM color helpers (e.g. interpolate_colors_batch) and the
shaders that consume their output interpret values as [0, 1]. Worker and
main-thread paths share this helper so the normalization can't drift between
them.
Coerce a (possibly quantized) color buffer to Float32 in [0, 1]. F32 inputs are assumed pre-normalized and pass through unchanged; Uint8 inputs are scaled by 1/255; Uint16 inputs are scaled by 1/65535.
The downstream WASM color helpers (e.g.
interpolate_colors_batch) and the shaders that consume their output interpret values as[0, 1]. Worker and main-thread paths share this helper so the normalization can't drift between them.