Chapter 7. Additional Lighting Models

This chapter expands on the previous lighting models by introducing point lights, spotlights, and multiple lights for your scenes. Along the way, you’ll refine your experience with HLSL and the effect framework.

Point Lights

A point light in a scene is like a light bulb—it has a position that is local to your surroundings, and it radiates light in all directions. This is in contrast to a directional light, which is infinitely far away and whose light appears to come from a single direction. Directional lights have no concept of “moving the light;” point lights have no concept of “rotating the light.”

You can use the same diffuse and specular lighting models with point lights, just as with directional lights. ...

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.