O'Reilly logo

Beginning WebGL for HTML5 by Brian Danchilla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 4

image

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required