Options
All
  • Public
  • Public/Protected
  • All
Menu

This class defines an interface which all shaders utilize

property

{object} uniforms The current uniforms of the Shader

interface

Hierarchy

Index

Constructors

  • Parameters

    • program: any
    • uniforms: any

    Returns AbstractBaseShader

Properties

_defaults: any

The initial default values of 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: any = {}

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

Methods

  • reset(): void
  • Reset the shader uniforms back to their provided default values

    Returns void

  • A factory method for creating the shader using its defined default values

    Parameters

    • defaultUniforms: any

    Returns AbstractBaseShader