Integrate

Process

On a technical level, the entire Integrate process includes two steps:

  1. Tile Classification
  2. Integrate for classified tiles

The first step is to improve parallelism by dividing the screen into 8x8 pixel tiles and then organizing them into three lists in different ways according to the Integrate method.

The second step is to perform Integrate calculations on each of these three lists separately.

This engineering design helps to improve parallelism, meaning that there won't be situations where some threads in the same group have heavy workloads while others have light workloads, and the entire group still needs to wait for the slowest thread to finish its work.

Tile Classification

image

Integrate for Pixels Support Importance Sample BRDF

In our Diffuse Cube test, all pixels were identified as 'Support Importance Sample BRDF', so we proceeded with the process for this part.

Overall Process

Overall, this step includes three sub-phases:

  1. Blending Phase: blend and interpolate four probes corresponding to each pixel.
  2. Calculate Diffuse Indirect Lighting.
  3. Calculate Rough Specular Indirect Lighting.

In principle, Indirect Lighting actually contains three components:

  • Fully Diffuse Reflection Component.
  • Rough Specular Reflection Component.
  • Fully Specular Reflection Component.
image

Since the first two components involve integral calculation, they are completed in this step. The last component does not involve integral calculation and will be completed in the later Lumen Reflection section.

If we try to integrate the red Radiance in each image mathematically, it will be impossible to complete.

Therefore, the method of Importance Sampling is used to estimate the results through sampling.

For each sub-step, there is a similar process:

  • Generate a random factor E
  • Sample BxDF
  • Calculate Radiance based on the sampled BxDF sample
  • Weighted sum

Detailed Process

image

BxDF Sampling

ℹ️

Generate Uniform Distributed Sample

In this step, Lumen first generates random sampling sample information, mainly through the ComputeIndirectLightingSampleE function. It should be noted that Hammersley sequence is used here to generate sample points, which can produce more uniform random samples.