Skip to main content
Version: Phaser v3.88.2

BlurFXPipeline

The Blur FX Pipeline.

A Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect,

typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a

smooth blur resembling that of viewing the image through a translucent screen, distinctly different

from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination.

A Blur effect is added to a Game Object via the FX component:


const sprite = this.add.sprite();



sprite.postFX.addBlur();

Constructor

new BlurFXPipeline(game)

Parameters

nametypeoptionaldescription
gamePhaser.GameNoA reference to the Phaser Game instance.

Scope: static

Extends

Phaser.Renderer.WebGL.Pipelines.PostFXPipeline

Source: src/renderer/webgl/pipelines/fx/BlurFXPipeline.js#L13
Since: 3.60.0

Inherited Members

From Phaser.Renderer.WebGL.Pipelines.PostFXPipeline:

From Phaser.Renderer.WebGL.WebGLPipeline:


Public Members

glcolor

glcolor: Array.<number>

Description:

The internal gl color array.

Source: src/renderer/webgl/pipelines/fx/BlurFXPipeline.js#L110
Since: 3.60.0


steps

steps: number

Description:

The number of steps to run the Blur effect for.

This value should always be an integer.

It defaults to 4. The higher the value, the smoother the blur,

but at the cost of exponentially more gl operations.

Keep this to the lowest possible number you can have it, while

still looking correct for your game.

Source: src/renderer/webgl/pipelines/fx/BlurFXPipeline.js#L84
Since: 3.60.0


strength

strength: number

Description:

The strength of the blur effect.

Source: src/renderer/webgl/pipelines/fx/BlurFXPipeline.js#L101
Since: 3.60.0


x

x: number

Description:

The horizontal offset of the blur effect.

Source: src/renderer/webgl/pipelines/fx/BlurFXPipeline.js#L66
Since: 3.60.0


y

y: number

Description:

The vertical offset of the blur effect.

Source: src/renderer/webgl/pipelines/fx/BlurFXPipeline.js#L75
Since: 3.60.0


Inherited Methods

From Phaser.Events.EventEmitter:

From Phaser.Renderer.WebGL.Pipelines.PostFXPipeline:

From Phaser.Renderer.WebGL.WebGLPipeline:


Public Methods

setQualityHigh

<instance> setQualityHigh()

Description:

Sets the quality of the blur effect to high.

Returns: Phaser.Renderer.WebGL.Pipelines.FX.BlurFXPipeline - This FX Pipeline.

Source: src/renderer/webgl/pipelines/fx/BlurFXPipeline.js#L150
Since: 3.60.0


setQualityLow

<instance> setQualityLow()

Description:

Sets the quality of the blur effect to low.

Returns: Phaser.Renderer.WebGL.Pipelines.FX.BlurFXPipeline - This FX Pipeline.

Source: src/renderer/webgl/pipelines/fx/BlurFXPipeline.js#L120
Since: 3.60.0


setQualityMedium

<instance> setQualityMedium()

Description:

Sets the quality of the blur effect to medium.

Returns: Phaser.Renderer.WebGL.Pipelines.FX.BlurFXPipeline - This FX Pipeline.

Source: src/renderer/webgl/pipelines/fx/BlurFXPipeline.js#L135
Since: 3.60.0