Implementing a Directional Light with Lambertian Reflectance
To implement diffuse reflection, we can use a simple technique known as Lambertian reflectance. Named after Johann Heinrich Lambert, a Swiss mathematician and astronomer who lived in the eighteenth century, Lambertian reflectance describes a surface that reflects the light hitting it in all directions, so that it appears the same from all viewpoints. Its appearance depends only on its orientation and distance from a light source.
Let’s look at an example with a flat surface and a single, directional light source that does not diminish with distance, so the only thing that matters is the orientation of the surface with respect to the light. In Figure 64, A surface directly facing a ...
Get OpenGL ES 2 for Android now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.