ch6_Wall_LightArrays.htmlin your HTML5 browser. This scene looks exactly as
ch6_Wall_Final.html, however the code required to write this scene is much less as we are using uniform arrays. Let's see how the use of uniform arrays change our code.
ch6_Wall_LightArrays.htmlusing your favorite source code editor. Let's take a look at the vertex shader. Note the use of the constant integer expression
const int NUM_LIGHTS = 3; to declare the number of lights that the shader will handle.
Note that we are using a varying array to pass the light rays (for ...