Phaser API Documentation

  Version: 
addBokeh([radius], [amount], [contrast])

Description:

Adds a Bokeh effect.

Bokeh refers to a visual effect that mimics the photographic technique of creating a shallow depth of field. This effect is used to emphasize the game's main subject or action, by blurring the background or foreground elements, resulting in a more immersive and visually appealing experience. It is achieved through rendering techniques that simulate the out-of-focus areas, giving a sense of depth and realism to the game's graphics.

See also Tilt Shift.

Parameters:

name type arguments Default description
radius number <optional> 0.5

The radius of the bokeh effect.

amount number <optional> 1

The amount of the bokeh effect.

contrast number <optional> 0.2

The color contrast of the bokeh effect.

Returns:
Description:

The Bokeh FX Controller.

Since: 3.60.0