Deferred Lighting

Deferred Lighting

Motivation #

Many fragments are overwritten by the Rasterizer because a closer fragment was rendered later, thus the fragment shader work for those fragments was unneccessary.

How it works #

  • Do the rasterization into a G-Buffer (Geometry buffer) which contains all fragment shader inputs.
  • After that, shade all fragments in a second render pass

Evaluation #

Pros #

  • Only visible fragments are shaded
  • G-Buffer also useful for post-processing

Cons #

  • Engine becomes more complicated
  • Requires more memory
  • MSAA costly and complex
  • Translucent objects require forward rendering
Calendar October 22, 2023