In this post, we’re continuing to read Eric Veach’s doctoral thesis . In our last installment , we covered the first half of the thesis, dealing with theoretical foundations for Monte Carlo rendering. This time we’re tackling chapters 8–9, including one of the key algorithms this thesis is famous for: multiple importance sampling. Without further ado, let’s tuck in! As before, this isn’t going to…
If you’ve studied path tracing or physically-based rendering in the last twenty years, you’ve probably heard of Eric Veach . His Ph.D thesis, published in 1997, has been hugely influential in Monte Carlo rendering. Veach introduced key techniques like multiple importance sampling and bidirectional path tracing, and clarified a lot of the mathematical theory behind Monte Carlo rendering. These…
A few years ago I came across an interesting problem. I was trying to implement some custom texture filtering logic in a pixel shader. It was for a shadow map, and I wanted to experiment with filters beyond the usual hardware bilinear. I went about it by using texture gathers to retrieve a neighborhood of texels, then performing my own filtering math in the shader. I used frac on the scaled…
View on GitHub Have you ever thought about adding a submodule to your git project, but you didn’t want to bear the burden of downloading and storing the submodule’s entire history, or you only need a handful of files out of the submodule? Git provides partial clone and sparse checkout features that can make this happen for top-level repositories, but so far they aren’t available for submodules.…
When you read BRDF theory papers, you’ll often see mention of slope space . Sometimes, components of the BRDF such as NDFs or masking-shadowing functions are defined in slope space, or operations are done in slope space before being converted back to ordinary vectors or polar coordinates. However, the meaning and intuition of slope space is rarely explained. Since it may not be obvious exactly…
Back in 2013, I wrote a somewhat popular article about pseudorandom number generation on the GPU. In the eight years since, a number of new PRNGs and hash functions have been developed; and a few months ago, an excellent paper on the topic appeared in JCGT: Hash Functions for GPU Rendering , by Mark Jarzynski and Marc Olano. I thought it was time to update my former post in light of this paper’s…
With some of my spare time lately, I’ve been enjoying learning about some of the new features in C++20. Concepts and the closely-related requires clauses are two great extensions to template syntax that remove the necessity for all the SFINAE junk we used to have to do, making our code both more readable and more precise, and providing much better error messages (although MSVC has sadly been…
Python has a handy built-in function called enumerate() , which lets you iterate over an object (e.g. a list) and have access to both the index and the item in each iteration. You use it in a for loop, like this: for i , thing in enumerate ( listOfThings ): print ( "The %d th thing is %s " % ( i , thing )) Iterating over listOfThings directly would give you thing , but not i , and there are plenty…
Like many of you, when I work on a graphics project I sometimes have a need to compile some shaders. Usually, I’m writing in C++ using Visual Studio, and I’d like to get my shaders built using the same workflow as the rest of my code. Visual Studio these days has built-in support for HLSL via fxc , but what if we want to use the next-gen dxc compiler? This post is a how-to for adding support for a…
NVIDIA recently announced their latest GPU architecture, called Turing. Although its headlining feature is hardware-accelerated ray tracing , Turing also includes several other developments that look quite intriguing in their own right. One of these is the new concept of mesh shaders , details of which dropped a couple weeks ago—and the graphics programming community was agog, with many…