The camera that owns this filter.
Toggle this boolean to enable or disable this filter, without removing it from and re-adding it to the Camera's filter list.
ReadonlyallowIf true, this filter will be permitted to draw to the base texture.
This can be unwanted if, for example, the filter doesn't actually
draw anything.
This is an internal flag used by the renderer. You should not modify this value directly.
The Blend filter controller that composites the top and bottom FilterList outputs into a single result. It is a standard Phaser.Filters.Blend controller whose blend mode and amount can be configured to control how the two outputs are combined. See Phaser.Filters.Blend for more information.
The texture property of the Blend controller will be
overwritten during rendering.
The bottom FilterList. Filters added to this list receive the original input and are processed independently from the top list. The final output of this list serves as the base image onto which the top output is blended by the Blend controller.
A reference to the Camera that owns this filter.
The padding currently being used by this filter.
This is read during rendering via getPadding, and may be updated by subclass implementations.
It is necessary for filters being used in an external list.
You should not modify this value directly.
Whether this filter controller will be destroyed when the FilterList that owns it is destroyed. If you enable this, you must ensure that you clean up the filter controller at an appropriate time. This allows you to reuse a controller for multiple objects; this is not recommended unless you know what you're doing. It tends to work best with external filters.
Padding override. This is on by default. If this is set,
the filter will use this padding instead of calculating it.
Prefer using setPaddingOverride instead of modifying this directly.
The ID of the RenderNode that this filter uses.
The top FilterList. Filters added to this list receive the original input and are processed independently from the bottom list. The final output of this list is passed to the Blend controller as a blend texture, which is then composited onto the bottom output.
Destroys this Controller and nulls any references it holds.
Returns the raw padding required for this filter.
This is typically not what you want to call; use getPaddingCeil instead.
Values from this method are not rounded, which can cause quality loss.
Override this method when creating a Filter that requires extra room, e.g. a blur or glow effect.undefined
The padding required by this filter.
Returns the rounded padding required for this filter.
Most filters don't need extra padding, but some may sample beyond the texture boundaries, such as a blur or glow effect.
The bounds are encoded as a Rectangle. To enlarge the bounds, the top and left values should be negative, and the bottom and right values should be positive.
This method calls getPadding() to get the raw padding values,
and uses Math.ceil() to set the values of paddingOverride
and currentPadding.undefined
The rounded padding required by this filter.
Sets the active state of this filter.
A disabled filter will not be used.
true to enable this filter, or false to disable it.
This filter instance.
Sets the padding override.
If this is set, the filter will use this padding instead of calculating it.
Call setPaddingOverride(null) to clear the override.
Call setPaddingOverride() to set the padding to 0.
Optionalleft: number | null
The left padding. Default 0.
Optionaltop: number
The top padding. Default 0.
Optionalright: number
The right padding. Default 0.
Optionalbottom: number
The bottom padding. Default 0.
The Parallel Filters Controller.
This filter controller splits the input into two lists of filters, runs each list separately, and then blends the results together.
The Parallel Filters effect is useful for reusing an input. Ordinarily, a filter modifies the input and passes it to the next filter. This effect allows you to split the input and re-use it elsewhere. It does not gain performance benefits from parallel processing; it is a convenience for reusing the input.
The Parallel Filters effect is not a filter itself. It is a controller that manages two FilterLists, and the final Blend filter that combines the results. The FilterLists are named 'top' and 'bottom'. The 'top' output is applied as a blend texture to the 'bottom' output.
You do not have to populate both lists. If only one is populated, it will be blended with the original input at the end. This is useful when you want to retain image data that would be lost in the filter process.
A Parallel Filters effect is added to a Camera via the FilterList component: