This version
Step along the view ray through the height field until it is hit, so bumps hide each other as the view tilts, plus self-shadowing toward the light.
How this version works
Rendered at scale 0.8, this fragment shader creates a repeating height field of rounded raised studs. An animated view direction shifts the sampling position through up to 40 descending height layers, stopping at the first intersection without further refinement. Finite differences at that position produce a normal for diffuse and power-30 specular lighting. A second march takes up to 16 steps towards a fixed light, reducing illumination to 35 per cent where another height sample blocks it. Height blends the surface colour from dark purple to orange.
The trick in this version
Two bounded ray marches in one fragment shader provide apparent depth and self-shadowing without constructing stud geometry. Fixed step counts limit intersection precision, while the reduced rendering scale lowers the number of fragments doing this work.
Historical context · GPU
2000 · Mark Kilgard / NVIDIA · GDC 2000
Bump mapping on the GPU
Normal maps, normalisation cube maps and register-combiner dot products: the bridge from lookup tricks to per-pixel GPU lighting.
today · Joey de Vries · LearnOpenGL
Normal mapping as routine
Tangent-space normal maps make detailed surface lighting standard without adding a single triangle.
- Platform
- GPU · GLSL
- Era
- GPU
- Rendered on
- GPU
- Tags
- ray stepping · self-shadow