This class defines an interface which all shaders utilize.

Mixes

BaseShaderMixin

Abstract

Hierarchy (view full)

Properties

initialUniforms: object

The initial values of the shader uniforms.

vertexShader: string = ""

The raw vertex shader used by this class. A subclass of AbstractBaseShader must implement the vertexShader static field.

fragmentShader: string = ""

The raw fragment shader used by this class. A subclass of AbstractBaseShader must implement the fragmentShader static field.

defaultUniforms: object = {}

The default uniform values for the shader. A subclass of AbstractBaseShader must implement the defaultUniforms static field.

Methods

  • Reset the shader uniforms back to their initial values.

    Returns void

  • Protected

    A one time initialization performed on creation.

    Returns void

  • Protected Internal

    Perform operations which are required before binding the Shader to the Renderer.

    Parameters

    • mesh: DisplayObject

      The mesh display object linked to this shader.

    • renderer: Renderer

      The renderer

    Returns void