new PIXI.Filter (vertexSrc, fragmentSrc, uniforms) overrides
Name | Type | Attributes | Description |
---|---|---|---|
vertexSrc |
string |
<optional> |
The source of the vertex shader. |
fragmentSrc |
string |
<optional> |
The source of the fragment shader. |
uniforms |
Dict<any> |
<optional> |
Custom uniforms to use to augment the built-in ones. |
Extends
Members
The default fragment shader source
PIXI.Filter.defaultMultisample PIXI.MSAA_QUALITY | unknown static
Default filter samples for any filter.
- Default Value:
- PIXI.MSAA_QUALITY.NONE
Default filter resolution for any filter.
- Default Value:
- 1
The default vertex shader source
Used for caching shader IDs.
If enabled, PixiJS will fit the filter area into boundaries for better performance. Switch it off if it does not work for specific shader.
- Default Value:
- true
blendMode PIXI.BLEND_MODES
Sets the blend mode of the filter.
- Default Value:
- PIXI.BLEND_MODES.NORMAL
If enabled is true the filter is applied, if false it will not.
Legacy filters use position and uvs from attributes (set by filter system)
multisample PIXI.MSAA_QUALITY | null
The samples override of the filter instance.
If set to null
, the sample count of the current render target is used.
- Default Value:
- PIXI.Filter.defaultMultisample
The padding of the filter. Some filters require extra space to breath such as a blur. Increasing this will add extra width and height to the bounds of the object that the filter is applied to.
The resolution of the filter. Setting this to be lower will lower the quality but
increase the performance of the filter.
If set to null
or 0
, the resolution of the current render target is used.
- Default Value:
- PIXI.Filter.defaultResolution
state PIXI.State
The WebGL state the filter requires to render.
Methods
Applies the filter
Name | Type | Attributes | Description |
---|---|---|---|
filterManager |
PIXI.FilterSystem |
The renderer to retrieve the filter from |
|
input |
PIXI.RenderTexture |
The input render target. |
|
output |
PIXI.RenderTexture |
The target to output to. |
|
clearMode |
PIXI.CLEAR_MODES |
<optional> |
Should the output be cleared before rendering to it. |
_currentState |
object |
<optional> |
It's current state of filter. There are some useful properties in the currentState : target, filters, sourceFrame, destinationFrame, renderTarget, resolution |
Inherited Properties
From class PIXI.Shader
program PIXI.Program inherited
Program that the shader uses.
uniforms Dict<any> readonly inherited
Shader uniform values, shortcut for uniformGroup.uniforms
.