Lighting Demo

Your browser does not support the HTML5 canvas.

Light 0: Point Light - Single position with near and far radii where objects can be fully, partiall, or unlit

Light 1: Directional Light - Ambient light for the whole scene

Light 3: Spot Light - Offers directional and angular attenuation parameter

Light 4: Spot Light - Offers directional and angular attenuation parameter

Number keys 0, 1, 2, and 3: Select the corresponding light source

Arrow keys: Move the currently selected light

Arrow keys with spacebar pressed: Change the direction of the currently selected light

Z/X key: Increases/decreases the light z position

C/V and B/N keys: Increase/decrease the inner and outer cone angles of the selected light

K/L key: Increases/decreases the intensity of the selected light

H key: Toggles the selected light on/off

The lighting system supports 3 types of light: point, directional, and spotlight. There are manipulations provided for light color, angle, attenuation, intensity, position, and on/off state for each light. There is also support for UV textures and shadows, notice which characters have shadows applied against different backgrounds, and which have textures.