Class: Shader

PIXI.Shader

A helper class for shaders

new PIXI.Shader (program, uniforms)

Shader.ts:23
Name Type Attributes Description
program PIXI.Program <optional>

The program the shader will use.

uniforms object <optional>

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

Members

program PIXI.Program

Program that the shader uses

uniforms object readonly

Shader uniform values, shortcut for uniformGroup.uniforms

Methods

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

Shader.ts:96

A short hand function to create a shader based of a vertex and fragment shader

Name Type Attributes 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.Shader an shiny new Pixi shader!

destroy () void

Shader.ts:79