Shader

Shader

Static default shader sources.

Constructor

new Shader()

Source:
Example
const sourceFragment = Shader.sourceFragment;
const sourceVertex = Shader.sourceVertex;

Members

(readonly) attributes :Object.<string, TypeTypeAttribute>

Description:
  • Stores the attributes needed by the shader program.
Source:
Stores the attributes needed by the shader program.
Type:
  • Object.<string, TypeTypeAttribute>

(readonly) sourceFragment :string

Description:
  • Stores the fragment shader source.
Source:
Stores the fragment shader source.
Type:
  • string

(readonly) sourceVertex :string

Description:
  • Stores the vertex shader source.
Source:
Stores the vertex shader source.
Type:
  • string

(readonly) uniforms :Object.<string, TypeTypeUniform>

Description:
  • Stores the uniforms needed by the shader program.
Source:
Stores the uniforms needed by the shader program.
Type:
  • Object.<string, TypeTypeUniform>

Type Definitions

TypeTypeAttribute

Description:
  • A type of attribute.
Source:
A type of attribute.
Type:
  • SHADER_PARAMETER_TYPES.VECTOR_2 | SHADER_PARAMETER_TYPES.VECTOR_3

TypeTypeUniform

Description:
  • A type of uniform.
Source:
A type of uniform.
Type:
  • SHADER_PARAMETER_TYPES.BOOLEAN | SHADER_PARAMETER_TYPES.ARRAY_BOOLEAN | SHADER_PARAMETER_TYPES.FLOAT | SHADER_PARAMETER_TYPES.ARRAY_FLOAT | SHADER_PARAMETER_TYPES.INTEGER | SHADER_PARAMETER_TYPES.ARRAY_INTEGER | SHADER_PARAMETER_TYPES.MATRIX_4 | SHADER_PARAMETER_TYPES.ARRAY_MATRIX_4 | SHADER_PARAMETER_TYPES.SAMPLER_2D | SHADER_PARAMETER_TYPES.VECTOR_2 | SHADER_PARAMETER_TYPES.ARRAY_VECTOR_2 | SHADER_PARAMETER_TYPES.VECTOR_3 | SHADER_PARAMETER_TYPES.ARRAY_VECTOR_3