Demonstrating environment mapping for reflections

One of the great techniques of computer graphics is reflections. The truest reflection is looking through a mirror. Since mirrors generally have no distortion, this can be achieved by rendering from a second camera. Most reflections are of other surfaces such as metal, a pane of glass, or water (such as a still lake). If the scene contains multiple reflective surfaces, it grows in complexity. Such photorealism is beyond the capabilities of WebGL, for now. But like so much in computer graphics, we deploy techniques to accomplish a close representation of reflections – environment maps. Essentially, an environment map is created by placing 3D object(s), such as the car, inside a cube where each of ...

Get WebGL HOTSHOT now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.