new ColorMatrixFilter()
The ColorMatrixFilter class lets you apply a 5x4 matrix transformation on the RGBA
color and alpha values of every pixel on your displayObject to produce a result
with a new set of RGBA color and alpha values. It's pretty powerful!
 var colorMatrix = new ColorMatrixFilter();
 container.filters = [colorMatrix];
 colorMatrix.contrast(2);Extends
Members
- 
    padding :number
- 
    
    The extra padding that the filter might need Type:- number
 - Inherited From:
- Source:
 
- 
    uniforms :object
- 
    
    The uniforms as an object Type:- object
 - Inherited From:
- Source:
 
Methods
- 
    _colorMatrix(matrix)
- 
    
    Create a Float32 Array and normalize the offset component to 0-1 Parameters:Name Type Description matrixArray.<number> (mat 5x4) Returns:m (mat 5x4) with all values between 0-1 - Type
- Array.<number>
 
- 
    _loadMatrix(matrix, multiply)
- 
    
    Transforms current matrix and set the new one Parameters:Name Type Description matrixArray.<number> (mat 5x4) multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix 
- 
    _multiply(out, a, b)
- 
    
    Multiplies two mat5's Parameters:Name Type Description outArray.<number> (mat 5x4) the receiving matrix aArray.<number> (mat 5x4) the first operand bArray.<number> (mat 5x4) the second operand Returns:out (mat 5x4) - Type
- Array.<number>
 
- 
    applyFilter(renderer, input, output, clear)
- 
    
    Applies the filter Parameters:Name Type Description rendererPIXI.WebGLRenderer The renderer to retrieve the filter from inputPIXI.RenderTarget outputPIXI.RenderTarget clearboolean Whether or not we want to clear the outputTarget - Inherited From:
- Source:
 
- 
    blackAndWhite(multiply)
- 
    
    Set the black and white matrice 
 Multiply the current matrixParameters:Name Type Description multiplyboolean refer to ._loadMatrix() method 
- 
    brightness(b, multiply)
- 
    
    Adjusts brightness Parameters:Name Type Description bnumber value of the brigthness (0 is black) multiplyboolean refer to ._loadMatrix() method 
- 
    browni(multiply)
- 
    
    Brown delicious browni filter (thanks Dominic Szablewski) Parameters:Name Type Description multiplyboolean refer to ._loadMatrix() method 
- 
    contrast(amount, multiply)
- 
    
    Set the contrast matrix, increase the separation between dark and bright 
 Increase contrast : shadows darker and highlights brighter
 Decrease contrast : bring the shadows up and the highlights downParameters:Name Type Description amountnumber value of the contrast multiplyboolean refer to ._loadMatrix() method 
- 
    desaturate(multiply)
- 
    
    Desaturate image (remove color) Call the saturate function Parameters:Name Type Description multiplyboolean refer to ._loadMatrix() method 
- 
    getShader(renderer)
- 
    
    Grabs a shader from the current renderer Parameters:Name Type Description rendererPIXI.WebGLRenderer The renderer to retrieve the shader from - Inherited From:
- Source:
 
- 
    greyscale(scale, multiply)
- 
    
    Set the matrices in grey scales Parameters:Name Type Description scalenumber value of the grey (0 is black) multiplyboolean refer to ._loadMatrix() method 
- 
    hue(rotation, multiply)
- 
    
    Set the hue property of the color Parameters:Name Type Description rotationnumber in degrees multiplyboolean refer to ._loadMatrix() method 
- 
    kodachrome(multiply)
- 
    
    Color reversal film introduced by Eastman Kodak in 1935. (thanks Dominic Szablewski) Parameters:Name Type Description multiplyboolean refer to ._loadMatrix() method 
- 
    negative(multiply)
- 
    
    Negative image (inverse of classic rgb matrix) Parameters:Name Type Description multiplyboolean refer to ._loadMatrix() method 
- 
    polaroid(multiply)
- 
    
    Polaroid filter Parameters:Name Type Description multiplyboolean refer to ._loadMatrix() method 
- 
    saturate(amount, multiply)
- 
    
    Set the saturation matrix, increase the separation between colors 
 Increase saturation : increase contrast, brightness, and sharpnessParameters:Name Type Description amountnumber multiplyboolean refer to ._loadMatrix() method 
- 
    sepia(multiply)
- 
    
    Sepia image Parameters:Name Type Description multiplyboolean refer to ._loadMatrix() method 
- 
    syncUniform()
- 
    
    Syncs a uniform between the class object and the shaders. - Inherited From:
- Source:
 
- 
    technicolor(multiply)
- 
    
    Color motion picture process invented in 1916 (thanks Dominic Szablewski) Parameters:Name Type Description multiplyboolean refer to ._loadMatrix() method 
- 
    toBGR(multiply)
- 
    
    Filter who transforms : Red -> Blue and Blue -> Red Parameters:Name Type Description multiplyboolean refer to ._loadMatrix() method