-
Notifications
You must be signed in to change notification settings - Fork 2
Deferred Rendering
Michael Williams edited this page Apr 25, 2018
·
11 revisions
TODO: Describe deferred rendering and its advantages and disadvantages.
To use deferred rendering, use the appropriate render_config by setting graphics.config
to core/rendering/deferred
in your project's config.ini
. Also include the core/rendering/deferred
package in boot.packages
list and set environment.renderer
to deferred
.
Yeti's deferred rendering implementation uses deferred shading rather than deferred lighting for various reasons, notably:
- To reduce the number of scene passes and associated costs;
- to reduce the cost of intermediary buffers; and
- to allow for implementation of lighting and shading in compute shaders.
The geometry-buffer is highly compressed as a memory and bandwidth optimization:
- Material diffuse and specular are YCoCg encoded and sub-sampled a la ["The Compact YCoCg Frame Buffer", Mavridis and Papaioannou 2012], with heavily optimized reconstruction by leveraging fetch4 and gather4.
- Surface normals are encoded into two components via stereographic projection a la Crysis 3.
- We may move towards Octrahedral encoding.
- In the future, additional material parameters such as surface depth for SSS a la Frostbite 2, or material information a la Destiny, will be encoded in a global texture and looked up via ID.
Render Target | Red | Green | Blue | Alpha |
---|---|---|---|---|
Depth & Stencil | Depth | - | - | Stencil |
Render Target 0 | Diffuse (YCoCg) | - | Specular (YCoCg) | - |
Render Target 1 | Normal (Encoded) | - | Roughness | ID (Reserved) |