Ray tracing under the hood: rays, BVHs and GPU RT

12 steps · about 14 h · Intermediate

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. 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.

  10. 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.

  11. 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.

  12. 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.