API Docs for: 2.0.0
Show:

ConvolutionFilter Class

The ConvolutionFilter class applies a matrix convolution filter effect. A convolution combines pixels in the input image with neighboring pixels to produce an image. A wide variety of image effects can be achieved through convolutions, including blurring, edge detection, sharpening, embossing, and beveling.

Constructor

ConvolutionFilter

(
  • texture
  • width
  • height
)

Parameters:

  • texture Array

    An array of values used for matrix transformation.

  • width Number

    Width of the object you are transforming

  • height Number

    Height of the object you are transforming

Item Index

Methods

Methods

syncUniforms

()

Syncs the uniforms between the class object and the shaders.

Properties

fragmentSrc

Array private

padding

Number

passes

Array an array of filter objects private

An array of passes - some filters contain a few steps this array simply stores the steps in a liniear fashion. For example the blur filter has two passes blurX and blurY.

shaders

Array an array of shaders private

uniforms

Object private