handmade.network Library
Raytracing
How to draw images by simulating light paths inside the computer.
Article

Point in Polygon Detection Strategies
Testing whether a point is inside a polygon is a basic operation in computer graphics. Graphics Gems presents an algorithm for testing points against convex polygons (Badouel 1990). This Gem provides algorithms which are from 1.6 to 9 or more times faster for convex polygons. It also presents algorithms for testing nonconvex polygons and discusses the advantages and drawbacks of each. Faster, more memory intensive algorithms are also presented, along with an O(log n) algorithm for convex polygons. Code is included for the algorithms discussed.

Square/Disc Mappings
Various methods to convert a point on a unit square to a point on a unit disc.

The Surface Area Heuristic
Improve raytracing performance by building a Bounding Volume Hierarchy using the Surface Area Heuristic as the splitting criterion.
"The SAH rewards small nodes with many triangles, while avoiding large nodes with few triangles."
Online Book

Physically Based Rendering: From Theory To Implementation
"Physically Based Rendering describes both the mathematical theory behind a modern photorealistic rendering system as well as its practical implementation. A method known as “literate programming” combines humanreadable documentation and source code into a single reference that is specifically designed to aid comprehension."

Raytracing in One Weekend
Several books with stepbystep instruction on building a raytracer and adding features and optimizations. By Peter Shirley.

Tiny Raycaster
"This text is written for those who only make first steps in programming. The main idea is to show, step by step, how to make a game à la Wolfenstein 3D. Attention, I am not going to compete with Carmack, he is a genius and his code is stunning. I aim a different goal: I'm using the huge computing power of modern computers to allow my students to create fun projects in very short time (typically few days), without getting stuck in the optimization nightmare."

Tiny Raytracer
"There are plenty of raytracing articles on the web; however the problem is that almost all of them show finished software that can be quite difficult to understand. Take, for example, the very famous businness card ray tracer challenge. It produces very impressive programs, but it's very difficult to understand how this works. Rather than showing that I can do renders, I want to tell you in detail how you can do it by yourself."
Paper

A LowDistortion Map Between Triangle and Square
Abstract: We introduce a lowdistortion map between triangle and square. This mapping yields an areapreserving parameterization that can be used for sampling random points with a uniform density in arbitrary triangles. This parameterization presents two advantages compared to the squareroot parameterization typically used for triangle sampling. First, it has lower distortions and better preserves the blue noise properties of the input samples. Second, its computation relies only on arithmetic operations(+, *), which makes it faster to evaluate.

Bidirectional Path Tracing and Multiple Importance Sampling (2 Minute Papers)
With a classical unidirectional path tracer, we'll have some scenes where it is difficult to connect to the light source, and therefore many of our computed samples will be wasted. What if we would start not only one light path from the camera, but one also from the light source, and connect the two together? It turns out that we get a much more robust technique that can render a variety of "packed" scenes with lots of occlusions with ease.

Mappings between Sphere, Disc, and Square
A variety of mappings between a sphere and a disc and between a disc and a square, as well as combinations of both, are used in computer graphics applications, resulting in mappings between spheres and squares. Many options exist for each type of mapping; to pick the right methods for a given application requires knowledge about the nature and magnitude of mapping distortions.
This paper provides an overview of forward and inverse mappings between a unit sphere, a unit disc, and a unit square. Quality measurements relevant for computer graphics applications are derived from tools used in the field of map projection, and a comparative analysis of the mapping methods is given.

Matrix rowcolumn sampling for the manylight problem
Computing global illumination using the manylights approach is expensive, this algorithm presents a method ("exploration") for reducing the amount of lights to be sampled.

Metropolis Light Transport (2 Minute Papers)
Metropolis Light Transport is a powerful technique that can outperform the convergence speed of Bidirectional Path Tracing on most difficult scenes (what makes a scene difficult is a story on its own). It promises optimal importance sampling "along multiple steps" in the stationary distribution of the Markov chain.

Photon Mapping (2 Minute Papers)
Describes the Photon Mapping solution to light transport.

Sampling with Hammersley and Halton Points
Abstract: The Hammersley and Halton point sets, two well known low discrepancy sequences, have been used for quasiMonte Carlo integration in previous research. A deterministic formula generates a uniformly distributed and stochasticlooking sampling pattern, at low computational cost. The Halton point set is also useful for incremental sampling. In this paper, we discuss detailed implementation issues and our experience of choosing suitable bases of the point sets, not just on the 2D plane,but also on a spherical surface. The sampling scheme is also applied to ray tracing, with a significant improvement in error.

Stochastic Lightcuts
A solution to the global illumination problem by sampling from many lights. Stochastic Lightcuts is an improvement on the earlier Lightcuts algorithm. Presentation at HPG 2019.

Stochastic Progressive Photon Mapping (2 Minute Papers)
Describes improvements to Photon Mapping, called Progressive Photon Mapping, Stochastic Photon Mapping, and their combination.
Repository

Path Tracing with Vulkan tutorial
This tutorial is a beginnerfriendly introduction to writing your own fast, photorealistic path tracer in less than 300 lines of C++ code and 250 lines of GLSL shader code using Vulkan. Here's an example of what you'll render at the end of this tutorial!

Tiny Raycaster
"This text is written for those who only make first steps in programming. The main idea is to show, step by step, how to make a game à la Wolfenstein 3D. Attention, I am not going to compete with Carmack, he is a genius and his code is stunning. I aim a different goal: I'm using the huge computing power of modern computers to allow my students to create fun projects in very short time (typically few days), without getting stuck in the optimization nightmare."

Tiny Raytracer
"There are plenty of raytracing articles on the web; however the problem is that almost all of them show finished software that can be quite difficult to understand. Take, for example, the very famous businness card ray tracer challenge. It produces very impressive programs, but it's very difficult to understand how this works. Rather than showing that I can do renders, I want to tell you in detail how you can do it by yourself."
YouTube Video

Advanced Global Illumination Using Photon Mapping
Photon mapping provides a practical way of efficiently simulating global illumination including interreflections, caustics, color bleeding, participating media and subsurface scattering in scenes with complicated geometry and advanced material models. This class will provide the insight necessary to efficiently implement and use photon mapping to simulate global illumination in complex scenes. The presentation will briefly cover the fundamentals of photon mapping including efficient techniques and datastructures for managing large numbers of rays and photons. In addition, we will describe how to integrate the information from the photon maps in shading algorithms to render global illumination.

Bidirectional Path Tracing and Multiple Importance Sampling (2 Minute Papers)
With a classical unidirectional path tracer, we'll have some scenes where it is difficult to connect to the light source, and therefore many of our computed samples will be wasted. What if we would start not only one light path from the camera, but one also from the light source, and connect the two together? It turns out that we get a much more robust technique that can render a variety of "packed" scenes with lots of occlusions with ease.

Matrix rowcolumn sampling for the manylight problem
Computing global illumination using the manylights approach is expensive, this algorithm presents a method ("exploration") for reducing the amount of lights to be sampled.

Metropolis Light Transport (2 Minute Papers)
Metropolis Light Transport is a powerful technique that can outperform the convergence speed of Bidirectional Path Tracing on most difficult scenes (what makes a scene difficult is a story on its own). It promises optimal importance sampling "along multiple steps" in the stationary distribution of the Markov chain.

Path Tracing and Next Event Estimation (2 Minute Papers)
A description of Path Tracing, a ray tracing solution to the rendering equation, and one of its traditional optimizations, Next Event Estimation.

Photon Mapping (2 Minute Papers)
Describes the Photon Mapping solution to light transport.

Practical Global Illumination with Irradiance Caching
Lighting usually only changes smoothly over a surface, Irradiance Caching is a classic approach to reduce the computational cost by only computing lighting at points where it changes quickly.

Radiosity
Lecture describing how to solve the radiosity equations used to compuse diffuse global illumination.

RayTraced Irradiance Fields (RealTime Light Probe Rendering)
[...] how to combine glossy reflection ray tracing with diffuse raytraced irradiance field probes. This creates a complete dynamic global illumination solution that scales across all DXR GPUs and minimizes light leaking without requiring manual perprobe or lightmap work by artists.

Stochastic Lightcuts
A solution to the global illumination problem by sampling from many lights. Stochastic Lightcuts is an improvement on the earlier Lightcuts algorithm. Presentation at HPG 2019.

Stochastic Progressive Photon Mapping (2 Minute Papers)
Describes improvements to Photon Mapping, called Progressive Photon Mapping, Stochastic Photon Mapping, and their combination.