Interface: FilterOptions

FilterOptions

The options to use when creating a new filter.

Properties:
Name Type Description
antialias FilterAntialias | boolean

If true the filter will make use of antialiasing. Although it looks better this can have a performance impact. By default, the filter will detect the antialiasing of the renderer and change this automatically. Definitely don't set this to true if the renderer has antialiasing set to false. As it will antialias, but you won't see the difference.

This can be a boolean or FilterAntialias string.

blendMode BLEND_MODES

optional blend mode used by the filter when rendering (defaults to 'normal')

blendRequired boolean

If this is set to true, the filter system will grab a snap shot oif the are being rendered to and pass this into the shader. This is useful for blend modes that need to be aware of the pixels they are rendering to. Only use if you need that data, otherwise its an extra gpu copy you don't need! (default false)

padding number

the amount of pixels to pad the container with when applying the filter. For example a blur extends the container out as it blurs, so padding is applied to ensure that extra detail is rendered as well without clipping occurring. (default 0)

resolution number

the resolution the filter should be rendered at. The lower the resolution, the more performant the filter will be, but the lower the quality of the output. (defaults to the renderers resolution) Consider lowering this for things like blurs filters

Members

antialias FilterAntialias | boolean

If true the filter will make use of antialiasing. Although it looks better this can have a performance impact. By default, the filter will detect the antialiasing of the renderer and change this automatically. Definitely don't set this to true if the renderer has antialiasing set to false. As it will antialias, but you won't see the difference.

This can be a boolean or FilterAntialias string.

blendMode BLEND_MODES

optional blend mode used by the filter when rendering (defaults to 'normal')

blendRequired boolean

If this is set to true, the filter system will grab a snap shot oif the are being rendered to and pass this into the shader. This is useful for blend modes that need to be aware of the pixels they are rendering to. Only use if you need that data, otherwise its an extra gpu copy you don't need! (default false)

padding number

the amount of pixels to pad the container with when applying the filter. For example a blur extends the container out as it blurs, so padding is applied to ensure that extra detail is rendered as well without clipping occurring. (default 0)

resolution number

the resolution the filter should be rendered at. The lower the resolution, the more performant the filter will be, but the lower the quality of the output. (defaults to the renderers resolution) Consider lowering this for things like blurs filters