Class: AbstractFilter

PIXI. AbstractFilter

new PIXI.AbstractFilter(vertexSrc, fragmentSrc, uniforms)

This is the base class for creating a PIXI filter. Currently only WebGL supports filters.
If you want to make a custom filter this should be your base class.

Name Type Description
vertexSrc string | Array.<string>

The vertex shader source as an array of strings.

fragmentSrc string | Array.<string>

The fragment shader source as an array of strings.

uniforms object

An object containing the uniforms for this filter.

Members

paddingnumber

The extra padding that the filter might need

uniformsobject

The uniforms as an object

Methods

applyFilter(renderer, input, output, clear)

Applies the filter

Name Type Description
renderer PIXI.WebGLRenderer

The renderer to retrieve the filter from

input PIXI.RenderTarget
output PIXI.RenderTarget
clear boolean

Whether or not we want to clear the outputTarget

Grabs a shader from the current renderer

Name Type Description
renderer PIXI.WebGLRenderer

The renderer to retrieve the shader from

Syncs a uniform between the class object and the shaders.