Class: ShaderLightAt

ShaderLightAt(shader, index) → {ShaderLightAt}

Support for loading light info to the GLSL shader

Found in Chapter 8, page 435 of the textbook

Example: 8.3 Multiple Lights

Constructor

new ShaderLightAt(shader, index) → {ShaderLightAt}

Parameters:
Name Type Description
shader WebGLProgram the compiled light shader this ShaderLightAt belongs to
index integer the index of this ShaderLightAt in the LightShader list of lights
Source:
Returns:
a new ShaderLightAt instance
Type
ShaderLightAt

Methods

loadToShader(aCamera, aLight)

Attach all the necessary properties of a Light object to the gl context
Parameters:
Name Type Description
aCamera Camera the Camera the light exists in
aLight Light the Light object to be loaded
Source:

switchOffLight()

Turn this Light off
Source: