Ray Tracing in pure CMake

Without further ado, I present: a basic whitted ray tracer, complete with multicore rendering, written in 100% pure CMake. If you don't care about the details, and just want to see the code, you can find it here.

Multiple Importance Sampling

In the previous article I described Importance Sampling, a method for reducing the variance of a Monte Carlo estimator. In this article I will discuss a technique called Multiple Importance Sampling which allows us to combine samples from multiple different probability distributions that we think match the shape of the integrand, reducing variance without introducing bias.

Monte Carlo Integration

Monte Carlo Integration is a numerical method for computing an integral abf(x)dx\int_a^b f(x)\mathrm{d}x which only requires being able to evaluate the function ff at arbitrary points. It is especially useful for higher-dimensional integrals (involving multiple variables) such as ABf(x,y)dxdy\int_A \int_B f(x, y)\mathrm{d}x\mathrm{d}y . In this article I will touch on the basics of Monte Carlo Integration as well as explain a number of variance reduction techniques which we can use to get a more accurate result with fewer computations.

Why we need alternatives to Actix

Don't get me wrong - I actually really like actix-web. It's got a simple and innovative API, a reasonably sized ecosystem of crates and examples (at least compared to other Rust web frameworks), real world usage - and notably - it's fast. Very fast. Despite these things, I'm going to try and spell out why I don't think it can be the framework of choice for the Rust community moving forward.

Tone Mapping

Most monitors are capable of displaying RGB values in the range of [0,255][0, 255] . However, in real life, there is no limit on the amount of light 'energy' incident on a point. Most renderers output linear radiance values in [0,)[0, \infty) , which needs to be mapped into a viewable range. Those radiance values are described as High Dynamic Range (HDR), because they are unlimited, and the viewable target range is described as Low Dynamic Range (LDR), because there is a fixed limit of 255. Put simply, tone mapping is the process of mapping HDR values in [0,)[0, \infty) into LDR values (e.g values in [0,255][0, 255] or [0.0,1.0][0.0, 1.0] ).