O'Reilly logo

OpenGL Shading Language, Third Edition by Mike Weiblen, Hugh Malan, Barthold Lichtenbelt, John M. Kessenich, Dan Ginsburg, Bill Licea-Kane, Randi J. Rost

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

I have a little shadow that goes in and out with me And what can be the use of him is more than I can see.

—From My Shadow by Robert Louis Stevenson

Like Robert Louis Stevenson, have you ever wondered what shadows are good for? The previous chapter discussed lighting models, and wherever there is light, there are also shadows. Well, maybe this is true in the real world, but it is not always true in computer graphics. We have talked a lot about illumination already and have developed a variety of shaders that simulate light sources. But so far we have not described any shaders that generate shadows. This lack of shadows is part of the classic computer graphics “look” and is one obvious clue that a scene is synthetic rather ...

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