Class: IllumShader

IllumShader(vertexShaderPath, fragmentShaderPath) → {IllumShader}

new IllumShader(vertexShaderPath, fragmentShaderPath) → {IllumShader}

Default Constructor

Subclass from LightShader (to take advantage of light sources)

Parameters:
Name Type Description
vertexShaderPath string filepath of the Vertex Shader.
fragmentShaderPath string filepath of the Fragment Shader.
Source:
Returns:
An intsnace of IllumShader.
Type
IllumShader

Methods

activateShader(pixelColor, aCamera) → {void}

Activate the shader for rendering.
Parameters:
Name Type Description
pixelColor Array.<float> [R, G, B, A] Sets the shader pixel color.
aCamera Camera Camera to draw to
Source:
Returns:
Type
void

setMaterialAndCameraPos(m, p) → {void}

Set shadder material and camera position
Parameters:
Name Type Description
m Material Material of shader
p vec2 Camera position of shader
Source:
Returns:
Type
void