Phaser API Documentation

  Version: 
blendFrames(source1, source2, [target], [strength], [clearAlpha], [blendShader])

Description:

Draws the source1 and source2 Render Targets to the target Render Target using a linear blend effect, which is controlled by the strength parameter.

Parameters:

name type arguments Default description
source1 Phaser.Renderer.WebGL.RenderTarget

The first source Render Target.

source2 Phaser.Renderer.WebGL.RenderTarget

The second source Render Target.

target Phaser.Renderer.WebGL.RenderTarget <optional>

The target Render Target.

strength number <optional> 1

The strength of the blend.

clearAlpha boolean <optional> true

Clear the alpha channel when running gl.clear on the target?

blendShader Phaser.Renderer.WebGL.WebGLShader <optional>

The shader to use during the blend copy.

Examples: