Apply a colormap texture (or null to disable) to a material.
Delegates the uniform / define mutation to the material's
setColormapTexture setter; reports the enabled-state transition
so callers can apply side effects on a flip.
Materials that don't implement ColormapAwareMaterial are
silently ignored — callers can pass any THREE.ShaderMaterial
and the helper falls through. The enabled-state check still uses
material.defines.USE_COLORMAP because that's the canonical
source of truth (see setColormapTexture).
Parameters
material: Material
The shader material to mutate.
texture: DataTexture|null
The LUT texture to bind, or null to disable.
Returns {wasEnabled:boolean;nowEnabled:boolean}
{ wasEnabled, nowEnabled } so callers can detect a transition.
Apply a colormap texture (or
nullto disable) to a material.Delegates the uniform / define mutation to the material's
setColormapTexturesetter; reports the enabled-state transition so callers can apply side effects on a flip.Materials that don't implement
ColormapAwareMaterialare silently ignored — callers can pass anyTHREE.ShaderMaterialand the helper falls through. The enabled-state check still usesmaterial.defines.USE_COLORMAPbecause that's the canonical source of truth (seesetColormapTexture).