PBR Part 3: The Radiance Integral

Took a few more days than I expected, but now let's jump right into it. This is a direct continuation of the last post about Image-Based Lighting. So, we need a PMREM for the indirect specular lighting. But the CubeMapGen tool that we've been using doesn't support the Cook-Torrence Microfacet model that's being used. So, the math for that has to be done manually. What we need to do is solve an equation called the radiance integral, shown below: This can be solved with a techn

PBR Part 2: Image Based Lighting Intro

Before I start my blog post, I want to clarify the purpose of this series. It is more about me documenting my process of learning and implementing PBR, rather than what PBR is. These blog posts cover the resources I have found, and I try to clarify (or elaborate on) some things in these articles/papers that I believe were vague or not well-enough explained. In my last post, I covered the math behind the Microfacet BRDF, which handles direct lighting. But now, we will tackle t

Visual Solutions to Algorithms: The Staircase

If you've ever visited Hackerrank, you are probably familiar with the classic warm-up problem known as The Staircase. But did you know you can solve for it without needing any code at all? Well, by solve, I mean "arrive at the correct algorithm"...you still need to type it out and have it run! So, first, let's go over what the problem wants: Consider a staircase of size n = 4: # ## ### #### Observe that its base and height are both equal to n, and the image is drawn using # s