module:extras/colormatrixshader

Back to documentation index.

### module:extras/colormatrixshader()

The extras/colormatrixshader.js module. To import all symbols in this module, either of the following can be used:

import * from "extras/colormatrixshader.js";
// -- or --
import * as CustomModuleName from "extras/colormatrixshader.js";

Members

Methods

### module:extras/colormatrixshader.colorMatrixShader (constant)

GLSL shader data for a family of image processing filters, which modify colors based on a transformation matrix, a 4x4 matrix that is multiplied by the red/green/blue color to get a new color. The shader program takes three uniforms: “sampler”, which is the texture to which the filter is to be applied, “t”, a value from 0 to 1 indicating how strongly to apply the color matrix, and “matrix”, which is the 4x4 matrix just described.

### (static) module:extras/colormatrixshader.getColorMatrix(kind)

Gets a specific kind of color matrix for the color matrix shader.

Parameters

Return Value

4x4 color matrix. (Type: Array.<number>)

Back to documentation index.