| Name | Type | Description |
|---|---|---|
renderer |
SINT.WebGLRenderer |
The renderer this manager works for. |
Extends
Members
-
renderer SINT.WebGLRenderer inherited overrides
-
The renderer this manager works for.
Methods
-
Draws a filter.
Name Type Description filterSINT.Filter The filter to draw.
inputSINT.RenderTarget The input render target.
outputSINT.RenderTarget The target to output to.
clearboolean Should the output be cleared before rendering to it
-
calculateNormalizedScreenSpaceMatrix (outputMatrix)SINT.Matrix
-
Multiply vTextureCoord to this matrix to achieve (0,0,1,1) for filterArea
Name Type Description outputMatrixSINT.Matrix The matrix to output to.
Returns:
Type Description SINT.Matrix The mapped matrix. -
calculateScreenSpaceMatrix (outputMatrix)SINT.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 space
Name Type Description outputMatrixSINT.Matrix the matrix to output to.
Returns:
Type Description SINT.Matrix The mapped matrix. -
calculateSpriteMatrix (outputMatrix, sprite)SINT.Matrix
-
This will map the filter coord so that a texture can be used based on the transform of a sprite
Name Type Description outputMatrixSINT.Matrix The matrix to output to.
spriteSINT.Sprite The sprite to map to.
Returns:
Type Description SINT.Matrix The mapped matrix. -
destroy (contextLost) overrides
-
Destroys this Filter Manager.
Name Type Default Description contextLostboolean false optional context was lost, do not free shaders
-
Empties the texture pool.
-
Frees a render target back into the pool.
Name Type Description renderTargetSINT.RenderTarget The renderTarget to free
-
getRenderTarget (clear, resolution)SINT.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 SINT.RenderTarget The new render target -
Generic method called when there is a WebGL context change.
-
Called before the renderer starts rendering.
-
Pops off the filter and applies it.
-
Adds a new filter to the manager.
Name Type Description targetSINT.DisplayObject The target of the filter to render.
filtersArray.<SINT.Filter> The filters to apply.
-
Returns a render target to the pool.
Name Type Description renderTargetSINT.RenderTarget The render target to return.
-
Uploads the uniforms of the filter.
Name Type Description shaderGLShader The underlying gl shader.
filterSINT.Filter The filter we are synchronizing.