Increasing Realism

In this chapter we will present ways to improve the realism of our scenes. As proper lighting is so fundamental to our visual perception, much of this chapter will build upon the end of the last chapter and focus on improvements to our lighting model. Specifically, we will

  • discuss the difference between flat and smooth shading
  • explain the Phong illumination model and then implement it as a shader program
  • show how to add fog
  • discuss techniques to generate shadows and add global illumination
  • blend objects and calculate reflection and refraction

As a mental exercise, take notice of your current surroundings. If you ...

Get Beginning WebGL for HTML5 now with O’Reilly online learning.

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