Building the AAA Lighting Pipeline in Three.js

This post is the progress report: the recommended pipeline from Part 2, measured against Three.js one stage at a time.

It uses the lighting terms from Part 1: indirect diffuse and specular, source, coverage, SSR and SSGI. It adds five more:

  • BRDF: the material's shading function: how a surface turns incoming light into the light you see.
  • G-buffer: per-pixel images of the visible surface (depth, normal, roughness) that screen-space effects read.
  • TRAA: temporal anti-aliasing; each frame is blended with the reprojected frames before it.
  • TAAU: temporal anti-aliasing with upscaling; the same accumulation, but the scene is rendered below the output resolution and the history is kept at the output resolution.
  • PMREM: an environment map pre-blurred for every roughness level, which is how Three.js lights from a cubemap.