Extends
Members
-
The opacity value to use when mixing the original and resultant colors.
When the value is 0, the original color is used without modification. When the value is 1, the result color is used. When in the range (0, 1) the color is interpolated between the original and result by this amount.
- Default Value:
- 1
-
autoFit boolean inherited
-
If enabled, PixiJS will fit the filter area into boundaries for better performance. Switch it off if it does not work for specific shader.
-
blendMode number inherited
-
Sets the blendmode of the filter
- Default Value:
- PIXI.BLEND_MODES.NORMAL
-
enabled boolean inherited
-
If enabled is true the filter is applied, if false it will not.
-
fragmentSrc string inherited
-
The fragment shader.
-
The matrix of the color matrix filter
- Default Value:
- [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]
-
padding number inherited
-
The padding of the filter. Some filters require extra space to breath such as a blur. Increasing this will add extra width and height to the bounds of the object that the filter is applied to.
-
resolution number inherited
-
The resolution of the filter. Setting this to be lower will lower the quality but increase the performance of the filter.
-
uniforms object inherited
-
An object containing the current values of custom uniforms.
Example
Updating the value of a custom uniform
filter.uniforms.time = performance.now(); -
vertexSrc string inherited
-
The vertex shader.
Methods
-
Transforms current matrix and set the new one
Name Type Default Description matrixArray.<number> 5x4 matrix
multiplyboolean false if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
apply (filterManager, input, output, clear, currentState) inherited
-
Applies the filter
Name Type Description filterManagerPIXI.FilterManager The renderer to retrieve the filter from
inputPIXI.RenderTarget The input render target.
outputPIXI.RenderTarget The target to output to.
clearboolean Should the output be cleared before rendering to it
currentStateobject optional It's current state of filter. There are some useful properties in the currentState : target, filters, sourceFrame, destinationFrame, renderTarget, resolution
-
Set the black and white matrice.
Name Type Description multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
Adjusts brightness
Name Type Description bnumber value of the brigthness (0-1, where 0 is black)
multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
Brown delicious browni filter (thanks Dominic Szablewski)
Name Type Description multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
We don't know exactly what it does, kind of gradient map, but funny to play with!
Name Type Description desaturationnumber Tone values.
tonednumber Tone values.
lightColorstring Tone values, example:
0xFFE580darkColorstring Tone values, example:
0xFFE580multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
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 down
Name Type Description amountnumber value of the contrast (0-1)
multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
Desaturate image (remove color)
Call the saturate function
-
Set the matrices in grey scales
Name Type Description scalenumber value of the grey (0-1, where 0 is black)
multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
Set the hue property of the color
Name Type Description rotationnumber in degrees
multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
Color reversal film introduced by Eastman Kodak in 1935. (thanks Dominic Szablewski)
Name Type Description multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
LSD effect
Multiply the current matrix
Name Type Description multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
Negative image (inverse of classic rgb matrix)
Name Type Description multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
Night effect
Name Type Description intensitynumber The intensity of the night effect.
multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
Polaroid filter
Name Type Description multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
Predator effect
Erase the current matrix by setting a new indepent one
Name Type Description amountnumber how much the predator feels his future victim
multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
Erase the current matrix by setting the default one
-
Set the saturation matrix, increase the separation between colors Increase saturation : increase contrast, brightness, and sharpness
Name Type Default Description amountnumber 0 The saturation amount (0-1)
multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
Sepia image
Name Type Description multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
Color motion picture process invented in 1916 (thanks Dominic Szablewski)
Name Type Description multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
Filter who transforms : Red -> Blue and Blue -> Red
Name Type Description multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix
-
Vintage filter (thanks Dominic Szablewski)
Name Type Description multiplyboolean if true, current matrix and matrix are multiplied. If false, just set the current matrix with @param matrix