Menu - Top - Home - Donate to Me


Back to documentation index.


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";



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.


Return Value

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

Back to documentation index.