Skip to main content
Version: Phaser v4.0.0

FilterVignette

This RenderNode renders the Vignette filter effect, which darkens the edges of the Game Object toward a configurable color, drawing visual focus toward the center of the image. The effect is controlled by a radius (how far the vignette extends inward), a strength (how intense the darkening is), a position (the center point of the vignette, in normalized 0-1 coordinates), a color, and a blend mode that determines how the vignette is composited over the source image.

This node is used internally by the WebGL renderer when a Phaser.Filters.Vignette controller is active on a Game Object. See Phaser.Filters.Vignette.

Constructor

new FilterVignette(manager)

Parameters

nametypeoptionaldescription
managerPhaser.Renderer.WebGL.RenderNodes.RenderNodeManagerNoThe manager that owns this RenderNode.

Scope: static

Extends

Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader

Source: src/renderer/webgl/renderNodes/filters/FilterVignette.js#L12
Since: 4.0.0

Inherited Methods

From Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader:

From Phaser.Renderer.WebGL.RenderNodes.RenderNode:


Public Methods

setupUniforms

<instance> setupUniforms(controller, _drawingContext)

Description:

Sets the WebGL shader uniforms required by the Vignette filter.

Passes the current vignette properties from the controller to the GPU, including the radius, strength, center position, color, and blend mode. This method is called automatically during rendering.

Parameters:

nametypeoptionaldescription
controllerPhaser.Filters.VignetteNoThe Vignette filter controller providing the effect properties.
_drawingContextPhaser.Renderer.WebGL.DrawingContextNoThe current drawing context. Not used by this filter.

Overrides: Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader#setupUniforms

Source: src/renderer/webgl/renderNodes/filters/FilterVignette.js#L41
Since: 4.0.0


Inherited Members

From Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader:

From Phaser.Renderer.WebGL.RenderNodes.RenderNode: