Shader Learn

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

Runs once per pixelDrag numbers, or edit the code

JS sidegl.uniformMatrix4fv(uModel, …) // rotation 0.35 / -0.45

A 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