Variable: Colormap
constColormap:object
Defined in: colormap.ts:33
A shader module that injects a 2D-array colormap texture and samples one
layer per fragment, indexed by colormapIndex.
Type Declaration
fs
readonlyfs: "uniform colormapUniforms {\n int colormapIndex;\n float reversed;\n} colormap;\n"
getUniforms
readonlygetUniforms: (props) =>object
Parameters
props
Returns
object
colormapIndex
colormapIndex:
number
colormapTexture
colormapTexture:
Texture|undefined=props.colormapTexture
reversed
reversed:
boolean
inject
readonlyinject:object
inject.fs:#decl
readonlyfs:#decl: "precision highp sampler2DArray;\nuniform sampler2DArray colormapTexture;\n"
inject.fs:DECKGL_FILTER_COLOR
readonlyfs:DECKGL_FILTER_COLOR: "\n float idx = mix(color.r, 1.0 - color.r, colormap.reversed);\n color = texture(\n colormapTexture,\n vec3(idx, 0.5, float(colormap.colormapIndex))\n );\n "
name
readonlyname:"colormap"=MODULE_NAME
uniformTypes
readonlyuniformTypes:object
uniformTypes.colormapIndex
readonlycolormapIndex:"i32"="i32"
uniformTypes.reversed
readonlyreversed:"f32"="f32"