Deferred Rendering
Deferred rendering is a graphics rendering technique that forms the counterpart of the more traditional forward rendering. Alternative names for these could be indirect (for deferred) and direct (for forward) rendering.
With this technique, all information required to compute the lit color of every pixel is first computed and stored in offscreen buffers, which are called Geometry Buffers, or G-Buffers for short. In a subsequent pass, these G-Buffers are used to perform the actual lighting calculations.
Types of G-Buffers
- Albedo
- Normals
- Positions
- Metallic
- Specular
- Roughness/Specular
- Screen Space Ambient Occlusion
- Screen Space Reflections
- …
Render Passes for deferred rendering:
- Geometry pass
- Lighting pass
- Forward pass
Possible speed-ups
Lighting calculations can be cut down by setting a radius for every light. Every fragment that is beyond that radius (according to the positions framebuffer), will not be affected by that light. This however requires an if-statement in the shader.
Advantages
- Rendering dozens of dynamic light sources is now possible even on lower-end machines without the need of things such as pre-baked lightmaps.
Problems
- Significant costs in terms of memory usage and bandwidth
- Drawing of transparent surfaces is now harder, because it requires drawing from back to front and blending with each layer. This can be solved with another forward rendering pass on top of the deferred rendering passes.
- Multisample Anti-Aliasing (MSAA) now carries a higher cost compared to forward rendering
Results
Since MSAA is costlier to realize with deferred rendering, post-processing based anti-aliasing techinques such as FXAA and TAA became more popular. These methods work by detecting jagged edges on the frame and blur them along their lines. Games that employed these methods thus gained an overall blurriness to their looks.