Skip to main content

Variable: Colormap

const Colormap: 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

readonly fs: "uniform colormapUniforms {\n int colormapIndex;\n float reversed;\n} colormap;\n"

getUniforms

readonly getUniforms: (props) => object

Parameters

props

Partial<ColormapProps>

Returns

object

colormapIndex

colormapIndex: number

colormapTexture

colormapTexture: Texture | undefined = props.colormapTexture

reversed

reversed: boolean

inject

readonly inject: object

inject.fs:#decl

readonly fs:#decl: "precision highp sampler2DArray;\nuniform sampler2DArray colormapTexture;\n"

inject.fs:DECKGL_FILTER_COLOR

readonly fs: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

readonly name: "colormap" = MODULE_NAME

uniformTypes

readonly uniformTypes: object

uniformTypes.colormapIndex

readonly colormapIndex: "i32" = "i32"

uniformTypes.reversed

readonly reversed: "f32" = "f32"