07 Surfaces and light
Normal maps: change the facing, not the shape
The plane is still flat, but every pixel’s normal is perturbed. Move the light and look.
02
440
-22
Exercise
Runs once per pixelDrag numbers, or edit the code
JS side
gl.uniformMatrix4fv(uModel, …) // rotation 0.35 / -0.45A normal map changes no geometry, only each pixel’s facing; the silhouette stays flat while the lighting gets bumps.
Try it
- Turn on “Show the normal map” to see the familiar blue-purple
- Turn the plane edge-on: the silhouette is still straight
- Move the light: the bumps follow