RSSAmplifier

Blog

Max Slater

Recent content on Max Slater

thenumb.atRSS feed ↗18 posts

Latest posts

Monte Carlo Crash Course

Continuous Probability Exponentially Better Integration Sampling Case Study: Rendering Quasi-Monte Carlo Coming Soon… Quasi-Monte Carlo We’ve learned how to define and apply Monte Carlo integration—fundamentally, it’s the only tool we need. In the remaining chapters, we’ll explore ways to reduce variance and successfully sample difficult distributions. Variance &…

Monte Carlo Crash Course

Continuous Probability Exponentially Better Integration Sampling Case Study: Rendering Quasi-Monte Carlo Coming Soon… Case Study: Rendering So far, we’ve explored Monte Carlo methods using simple examples, like sampling the unit disk and sphere. Now, we’ll apply Monte Carlo to a more realistic task: simulating light traveling through a scene, or rendering . Direct Lighting…

Monte Carlo Crash Course

Continuous Probability Exponentially Better Integration Sampling Case Study: Rendering Quasi-Monte Carlo Coming Soon… Sampling In the previous chapter, we assumed that we can uniformly randomly sample our domain. However, it’s not obvious how to actually do so—in fact, how can a deterministic computer even generate random numbers? 1 Pseudo-Random Numbers Uniform Rejection Sampling…

Monte Carlo Crash Course

Continuous Probability Exponentially Better Integration Sampling Case Study: Rendering Quasi-Monte Carlo Coming Soon… Exponentially Better Integration By introducing randomness, Monte Carlo methods let us integrate high-dimensional functions exponentially faster than traditional algorithms. Integration Quadrature The Curse of Dimensionality Monte Carlo Integration Why Monte Carlo? Bias and…

Monte Carlo Crash Course

Continuous Probability Exponentially Better Integration Sampling Case Study: Rendering Quasi-Monte Carlo Coming Soon… Continuous Probability Prerequisites: Discrete Probability , Multivariable Calculus This chapter is a condensed review of continuous probability. If you’re comfortable working with continuous random variables, you may want to skip it. Random Variables Probability Mass…

Oxidizing C++

I recently rewrote the C++20 infrastructure I use for personal projects, so I decided to snapshot its design in the style of another recent article . The library ( rpp ) is primarily inspired by Rust, and may be found on GitHub . I use rpp as an STL replacement, and I’m currently developing a real-time path tracer with it. rpp attempts to provide the following features, roughly in priority…

Functions are Vectors

Conceptualizing functions as infinite-dimensional vectors lets us apply the tools of linear algebra to a vast landscape of new problems, from image and geometry processing to curve fitting and machine learning. Prerequisites: introductory linear algebra , introductory calculus , introductory differential equations . This article received an honorable mention in 3Blue1Brown’s Summer of Math…

Optimizing Open Addressing

Your default hash table should be open-addressed, using Robin Hood linear probing with backward-shift deletion. When prioritizing deterministic performance over memory efficiency, two-way chaining is also a good choice. Code for this article may be found on GitHub . Open Addressing vs. Separate Chaining Benchmark Setup Discussion Separate Chaining Linear Probing Quadratic Probing Double Hashing…

Spherical Integration

Or, where does that $$\sin\theta$$ come from? Integrating functions over spheres is a ubiquitous task in graphics—and a common source of confusion for beginners. In particular, understanding why integration in spherical coordinates requires multiplying by $$\sin\theta$$ takes some thought. The Confusion So, we want to integrate a function $$f$$ over the unit sphere. For simplicity, let’s…

Exploring Neural Graphics Primitives

Neural fields have quickly become an interesting and useful application of machine learning to computer graphics. The fundamental idea is quite straightforward: we can use neural models to represent all sorts of digital signals, including images, light fields, signed distance functions, and volumes. Neural Networks Compression A Basic Network Activations Input Encodings Positional Encoding Instant…

Differentiable Programming from Scratch

Differentiable programming has become a hot research topic, and not only due to the popularity of machine learning frameworks like TensorFlow, PyTorch, and JAX. Many fields apart from machine learning are finding differentiable programming to be a useful tool for solving optimization problems. In computer graphics, differentiable rendering , differentiable physics , and neural representations are…

Exponentially Better Rotations

If you’ve done any 3D programming, you’ve likely encountered the zoo of techniques and representations used when working with 3D rotations. Some of them are better than others, depending on the situation. Based on CMU 15-462 course materials by Keenan Crane . Representations Rotation Matrices Euler Angles Quaternions Axis/Angle The Exponential and Logarithmic Maps Axis/Angle in 2D…

Graphics Blogroll

In no particular order, my list of cool computer graphics (or adjacent) blogs: Amit Patel Interactive algorithm visualizations Highlight: Introduction to A* Inigo Quilez 3D SDF rendering and shadertoy Highlight: 3D SDF Index Fabian Giesen Graphics programming, compression, comp arch, optimization Highlight: A trip through the Graphics Pipeline 2011 Bart Wronski Image/signal processing, real-time…

Hamming Hats

I first encountered the Hat Problem in CMU 15-251 . The Game Consider a 31-person game in which each player is assigned a red or blue hat, determined by an independent coin flip. The players can see everyone else’s hat color, but not their own. Once the game begins, no communication is allowed between the players. After looking at the other hats, all players must simultaneously either…

A Compiler Bug

While I was working on Dawn , I ran into a curious bug in the Visual Studio 2019 C++ compiler. I reported it to the bug tracker, where it was confirmed to be an interference analysis issue. It was eventually fixed nearly a year later in 2020. Today, let’s investigate what the issue really was. The problem arose upon implementing a Perlin noise type for procedural solid texturing. My type…

Exile: Voxel Rendering Pipeline

No, Exile is not technically a “voxel” engine. A real voxel engine unifies objects, textures, and more into colored voxel data, rendering them via raymarching/ marching cubes / dual contouring /etc., and can target realism. Instead, Exile is a “voxel” engine in that it’s a traditional 3D engine that happens to focus on representing and drawing textured cubes (like…

Exile: Reflection

Reflection , specifically type introspection, is an immensely useful feature provided by many modern languages. By enabling a way to inspect the properties of types—for example, the types of the members of a data structure—introspection allows one to write much more general and effective generic code, enforce interfaces/contracts, and more. Though most obviously found in dynamic languages,…

Exile: Hot Reloading

In game development, one of the main appeals of implementing game logic in a managed language (e.g. Lua) is the convenient ability to make changes to the source, reload the logic on the fly, and test the changes without restarting the game. A similar technique is also often used to refresh shader programs, asset files, and the like. However, supporting a secondary scripting language—or using one…