Chapter 19. Shadow Mapping

In this chapter, you learn how to render shadows. You learn about depth maps (2D textures that store depths instead of colors) and projective texture mapping (think the Batman signal). You also examine common problems with rendering shadows and determine how to address them.


Shadows are part of our visual experience, but unless you’re making shadow puppets, you don’t likely even notice the myriad shadows that surround you. Remove them, however, and something will feel off. That’s a conundrum for video games and simulations because realistic shadows are difficult to produce and computationally expensive. They are subtle and almost unconsciously perceived, but leave them out, and your users will notice that ...

Get Real-Time 3D Rendering with DirectX® and HLSL: A Practical Guide to Graphics Programming now with O’Reilly online learning.

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