This test will produce negative Lambert coefficients. This happens when you have vertex normals forming an obtuse angle with the negative light-direction vector. Set x to 0 and z to 1. You will be locating thie light source behind the sphere. Then, increase the intensity of the ambient light property. As it is explained in Chapter 3, we have modified the ambient light color to show you that when you the object is behind the object and your point of view, you do not account with the diffuse component to see the object.
Light Color (Light Diffuse Term): | Sphere Color (Material Diffuse Term): | ||||||
Light Ambient Term: | 0.03 | Material Ambient Term: | 1.0 | ||||
Light Specular Term: | 1.0 | Material Specular Term: | 1.0 | ||||
X: | -0.25 | Shininess: | 10.0 | ||||
Y: | -0.25 | Background Color (gl.clearColor): | |||||
Z: | -0.25 |
This model has three terms:
However, the diffusive and specular terms are only taken into account if the Lambert term is larger than zero.
In this case: I = Ia + Id + Is, otherwise (Lambert term <= 0):I = Ia