Workshop 15 – Light and shade

21st April 2015

Worksheets
Worksheets in pdf format

Work files and worksheet
All work files and worksheet pdf as zip

Basic scene
No lighting applied, each object within the scene is displayed with its colour.
Each object looks like a silhouette with no visible detail.

00lightnone
Scene with ambient light (and emissive material)
Ambient lighting is now applied to the scene.
Ambient lighting is applied evenly to an object. So, each object still looks like a silhouette with no visible detail. However the lightness of the scene can be controlled.
But, note that the “light” is not affected by the ambient light as it only has an emissive material.

01lightambient
Directional light
A directional light is added to the scene.

02lightdirectional
Directional light – fragment shader
Again directional light is added to the scene.
However, the lighting calculations are done in the fragment shader, making the lighting more accurate.

03lightdirectionalfrag
Directional light with materials (frag)
Support for all materials (ambient, emissive, diffuse and specular) is added to the scene.
Setting these values appropriately simulates different materials such as gold or copper.

04lightdirectionalmaterialfrag
Scene with point light and materials (frag)
A point light is added to the scene.
A point light has a position as well as a direction so as it approaches an object it has a greater effect.

05lightpointmaterial