Class: Program

PIXI.Program

Helper class to create a shader program.

new PIXI.Program (vertexSrc, fragmentSrc, name)

Name Type Default Description
vertexSrc string optional

The source of the vertex shader.

fragmentSrc string optional

The source of the fragment shader.

name string pixi-shader optional

Name for shader

Members

PIXI.Program.defaultFragmentSrc string static

The default fragment shader source

PIXI.Program.defaultVertexSrc string static

The default vertex shader source

fragmentSrc string

The fragment shader.

vertexSrc string

The vertex shader.

Methods

PIXI.Program.from (vertexSrc, fragmentSrc, uniforms)PIXI.Program static

A short hand function to create a program based of a vertex and fragment shader this method will also check to see if there is a cached program.

Name Type Description
vertexSrc string optional

The source of the vertex shader.

fragmentSrc string optional

The source of the fragment shader.

uniforms object optional

Custom uniforms to use to augment the built-in ones.

Returns:
Type Description
PIXI.Program an shiny new Pixi shader!

extractData (vertexSrc, fragmentSrc) protected

Extracts the data for a buy creating a small test program or reading the src directly.

Name Type Description
vertexSrc string optional

The source of the vertex shader.

fragmentSrc string optional

The source of the fragment shader.