new PIXI.FilterManager(renderer)
| Name | Type | Description |
|---|---|---|
renderer |
PIXI.WebGLRenderer |
The renderer this manager works for. |
Extends
Members
-
rendererPIXI.WebGLRenderer
-
The renderer this manager works for.
Methods
-
applyFilter(filter, input, output, clear)
-
Draws a filter.
Name Type Description filterPIXI.Filter The filter to draw.
inputPIXI.RenderTarget The input render target.
outputPIXI.RenderTarget The target to output to.
clearboolean Should the output be cleared before rendering to it
-
calculateNormalizedScreenSpaceMatrix(outputMatrix){PIXI.Matrix}
-
Multiply vTextureCoord to this matrix to achieve (0,0,1,1) for filterArea
Name Type Description outputMatrixPIXI.Matrix The matrix to output to.
Returns:
Type Description PIXI.Matrix The mapped matrix. -
calculateScreenSpaceMatrix(outputMatrix){PIXI.Matrix}
-
Calculates the mapped matrix.
TODO playing around here.. this is temporary - (will end up in the shader)
this returns a matrix that will normalise map filter cords in the filter to screen spaceName Type Description outputMatrixPIXI.Matrix the matrix to output to.
Returns:
Type Description PIXI.Matrix The mapped matrix. -
calculateSpriteMatrix(outputMatrix, sprite){PIXI.Matrix}
-
This will map the filter coord so that a texture can be used based on the transform of a sprite
Name Type Description outputMatrixPIXI.Matrix The matrix to output to.
spritePIXI.Sprite The sprite to map to.
Returns:
Type Description PIXI.Matrix The mapped matrix. -
Destroys this Filter Manager.
-
emptyPool()
-
Empties the texture pool.
-
freePotRenderTarget(renderTarget)
-
Frees a render target back into the pool.
Name Type Description renderTargetPIXI.RenderTarget The renderTarget to free
-
getRenderTarget(clear, resolution){PIXI.RenderTarget}
-
Gets a render target from the pool, or creates a new one.
Name Type Description clearboolean Should we clear the render texture when we get it?
resolutionnumber The resolution of the target.
Returns:
Type Description PIXI.RenderTarget The new render target -
inherited onContextChange()
-
Generic method called when there is a WebGL context change.
-
popFilter()
-
Pops off the filter and applies it.
-
pushFilter(target, filters)
-
Adds a new filter to the manager.
Name Type Description targetPIXI.DisplayObject The target of the filter to render.
filtersArray.<PIXI.Filter> The filters to apply.
-
returnRenderTarget(renderTarget)
-
Returns a render target to the pool.
Name Type Description renderTargetPIXI.RenderTarget The render target to return.
-
syncUniforms(shader, filter)
-
Uploads the uniforms of the filter.
Name Type Description shaderGLShader The underlying gl shader.
filterPIXI.Filter The filter we are synchronizing.