Optionaloptions: BlurFilterOptions
The options of the blur filter.
Optionalstrength: numberOptionalquality: numberOptionalresolution: number | nullOptionalkernelSize: numbershould the filter use antialiasing?
Whether or not this filter requires the previous render texture for blending.
The horizontal blur filter
The vertical blur filter
Clip texture into viewport or not
ReadonlycompatibleA number that uses two bits on whether the shader is compatible with the WebGL renderer and/or the WebGPU renderer. 0b00 - not compatible with either 0b01 - compatible with WebGL 0b10 - compatible with WebGPU This is automatically set based on if a GlProgram or GpuProgram is provided.
If enabled is true the filter is applied, if false it will not.
An instance of the GL program used by the WebGL renderer
An instance of the GPU program used by the WebGPU renderer
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.
A record of the resources used by the shader.
ReadonlyuidA unique identifier for the shader
StaticdefaultDefault blur filter options
// Set default options for all BlurFilters
BlurFilter.defaultOptions = {
strength: 10, // Default blur strength
quality: 2, // Default blur quality
kernelSize: 7 // Default kernel size
};
// Create a filter with these defaults
const filter = new BlurFilter(); // Uses default options
StaticprefixedSets the number of passes for blur. More passes means higher quality blurring. Controls the precision and smoothness of the blur effect at the cost of performance.
Sets the strength of both the blurX and blurY properties simultaneously. Controls the overall intensity of the Gaussian blur effect.
Sometimes a resource group will be provided later (for example global uniforms) In such cases, this method can be used to let the shader know about the group.
the name of the resource group
the index of the group (should match the webGPU shader group location)
the index of the bind point (should match the webGPU shader bind point)
Applies the filter.
The manager.
The input target.
The output target.
How to clear
Use to destroy the shader when its not longer needed. It will destroy the resources and remove listeners.
OptionaldestroyPrograms: boolean
if the programs should be destroyed as well. Make sure its not being used by other shaders!
Return an array listing the events for which the emitter has registered listeners.
Return the number of listeners listening to a given event.
Remove all listeners, or those of the specified event.
Optionalevent: "destroy"ProtectedupdateStaticfromA short hand function to create a filter based of a vertex and fragment shader src.
A shiny new PixiJS filter!
The BlurFilter applies a Gaussian blur to an object. The strength of the blur can be set for the x-axis and y-axis separately.
Example
Remarks
See
Standard
No Inherit Doc