Class: AbstractFilter

AbstractFilter


new 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.

Parameters:
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.

Source:

Members


padding :number

The extra padding that the filter might need

Type:
  • number
Source:

uniforms :object

The uniforms as an object

Type:
  • object
Source:

Methods


applyFilter(renderer, input, output, clear)

Applies the filter

Parameters:
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

Source:

getShader(renderer)

Grabs a shader from the current renderer

Parameters:
Name Type Description
renderer PIXI.WebGLRenderer

The renderer to retrieve the shader from

Source:

syncUniform()

Syncs a uniform between the class object and the shaders.

Source: