Skip to main content
Version: Phaser v3.90.0

PixelateFXPipeline

The Pixelate FX Pipeline.

The pixelate effect is a visual technique that deliberately reduces the resolution or detail of an image,

creating a blocky or mosaic appearance composed of large, visible pixels. This effect can be used for stylistic

purposes, as a homage to retro gaming, or as a means to obscure certain elements within the game, such as

during a transition or to censor specific content.

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


const sprite = this.add.sprite();



sprite.postFX.addPixelate();

Constructor

new PixelateFXPipeline(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/PixelateFXPipeline.js#L11
Since: 3.60.0

Inherited Members

From Phaser.Renderer.WebGL.Pipelines.PostFXPipeline:

From Phaser.Renderer.WebGL.WebGLPipeline:


Public Members

amount

amount: number

Description:

The amount of pixelation to apply.

Source: src/renderer/webgl/pipelines/fx/PixelateFXPipeline.js#L49
Since: 3.60.0


Inherited Methods

From Phaser.Events.EventEmitter:

From Phaser.Renderer.WebGL.Pipelines.PostFXPipeline:

From Phaser.Renderer.WebGL.WebGLPipeline: