Helper class to create a shader program.

Memberof

PIXI

Constructors

  • Parameters

    • Optional vertexSrc: string

      The source of the vertex shader.

    • Optional fragmentSrc: string

      The source of the fragment shader.

    • Optional name: string

      Name for shader

    • Optional extra: IProgramExtraData

      Extra data for shader

    Returns Program

Properties

attributeData: {
    [key: string]: IAttributeData;
}

Assigned when a program is first bound to the shader system.

Type declaration

fragmentSrc: string

Source code for the fragment shader.

glPrograms: {
    [key: number]: GLProgram;
}

Type declaration

id: number
nameCache: any
syncUniforms: any
uniformData: {
    [key: string]: IUniformData;
}

Assigned when a program is first bound to the shader system.

Type declaration

vertexSrc: string

Source code for the vertex shader.

defaultFragmentPrecision: PRECISION

Default specify float precision in fragment shader. iOS is best set at highp due to https://github.com/pixijs/pixijs/issues/3742

Static

Default

PIXI.PRECISION.MEDIUM
defaultVertexPrecision: PRECISION

Default specify float precision in vertex shader.

Static

Default

PIXI.PRECISION.HIGH

Accessors

  • get defaultFragmentSrc(): string
  • The default fragment shader source.

    Returns string

  • get defaultVertexSrc(): string
  • The default vertex shader source.

    Returns string

Methods

  • 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.

    Parameters

    • Optional vertexSrc: string

      The source of the vertex shader.

    • Optional fragmentSrc: string

      The source of the fragment shader.

    • Optional name: string

      Name for shader

    Returns Program

    A shiny new PixiJS shader program!

Generated using TypeDoc