Navigation
These archived docs are for Phaser 2.2.2 Phaser 3 docs can be found on newdocs.phaser.io.
Phaser CE docs can be found on the Phaser CE Documentation site.

Constructor

PIXI. PixiShader

new PixiShader(gl)

Parameters
Name Type Description
gl WebGLContext

the current WebGL drawing context

Source code: pixi/renderers/webgl/shaders/PixiShader.js, line 6

Public Properties

defaultVertexSrc : string

The Default Vertex shader source.

Source code: pixi/renderers/webgl/shaders/PixiShader.js, line 365

dirty : boolean

A dirty flag

Source code: pixi/renderers/webgl/shaders/PixiShader.js, line 63

fragmentSrc : Array

The fragment shader.

Source code: pixi/renderers/webgl/shaders/PixiShader.js, line 33

gl :WebGLContext

Source code: pixi/renderers/webgl/shaders/PixiShader.js, line 20

program : Object

The WebGL program.

Source code: pixi/renderers/webgl/shaders/PixiShader.js, line 26

textureCount : number

A local texture counter for multi-texture shaders.

Source code: pixi/renderers/webgl/shaders/PixiShader.js, line 48

Public Methods

destroy()

Destroys the shader.

Source code: pixi/renderers/webgl/shaders/PixiShader.js, line 351

init()

Initialises the shader.

Source code: pixi/renderers/webgl/shaders/PixiShader.js, line 83

initSampler2D()

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

Source code: pixi/renderers/webgl/shaders/PixiShader.js, line 208

initUniforms()

Initialises the shader uniform values.

Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

Source code: pixi/renderers/webgl/shaders/PixiShader.js, line 134

syncUniforms()

Updates the shader uniform values.

Source code: pixi/renderers/webgl/shaders/PixiShader.js, line 283