Ray tracing under the hood: rays, BVHs and GPU RT
12 steps · about 14 h · Intermediate
- Overview of the Ray-Tracing Rendering Technique (guide, Scratchapixel, 20 min)
Starts with the core idea that ray tracing is a way to compute visibility between points, one ray per pixel.
- Generating Camera Rays with Ray-Tracing (guide, Scratchapixel, 25 min)
Shows how to turn each pixel into a ray, which every later step builds on.
- Light and Shadows (guide, Scratchapixel, 15 min)
Adds shadow rays, a simple case of a second ray fired after a first hit, so you see why so many intersection tests are needed.
- Möller-Trumbore algorithm (guide, Scratchapixel, 30 min)
Teaches the standard ray/triangle test, one of the two core operations any ray-tracing hardware or emulator must perform.
- Ray - Box Intersection (reference, SIGGRAPH Education, 15 min)
Covers the slab method for ray/box tests, the other core operation, used to decide which BVH nodes to visit.
- Ray Tracing in One Weekend Series (guide, Peter Shirley et al., 5 h)
Build a working ray tracer yourself; the second book adds a BVH, so the concepts become code.
- How to build a BVH – Part 1: Basics (article, Jacco Bikker, 30 min)
Explains why a hierarchy of bounding volumes makes ray tracing fast, and how to build one automatically.
- How to build a BVH – part 5: TLAS & BLAS (article, Jacco Bikker, 30 min)
Introduces the two-level structure (instances over per-mesh BVHs) that GPU APIs use.
- tinybvh (repo, GitHub (unitycoder, mirror of Jacco Bikker's tinybvh), 45 min)
A small single-header BVH library whose code you can read to see build, refit and traversal in practice.
- Introduction to NVIDIA RTX and DirectX Ray Tracing (article, NVIDIA Developer Blog, 30 min)
Maps the BVH ideas onto the DXR API: bottom-level and top-level acceleration structures and ray tracing shaders.
- DirectX Raytracing (DXR) Functional Spec (doc, Microsoft DirectX Specs, 1 h)
The official spec shows the exact rules for building, updating and tracing acceleration structures.
- Vulkan Ray Tracing Tutorial KHR (tutorial, NVIDIA nvpro-samples, 4 h)
Closes by turning a Vulkan rasterizer into a ray tracer, so you see how a non-DirectX API handles the same acceleration structures.