Modern Graphics Pipelines

My thesis explores volumetric ray casting with clustered shading. Lets quickly go through some important different shading pipelines that lead up to the idea of clustered shading.

lxsf4fhcefqiqdun0hdi

Forward and Deferred Shading

Forward shading is the most simple version of rasterization rendering, where the geometry is rasterized and lighting calculations are made for each fragment. The method has a major disadvantage in that for each fragment you have to go through all lights in the scene, O(N_{fragments}*N_{lights}), thus limiting the number of lights you can use significantly. In deferred shading, the geometry and lighting passes are instead discoupled. The geometry is written to so-called Geometry Buffers (GBuffers) and lighting is only performed on the pixels on the screen: O(screen\_resolution * n_{lights}).

Tiled Deferred Shading and Forward+

A major advantage of deferred shading was that it was possible to have many more lights in a scene, but in addition to this different light culling techniques have been developed. These try to cull lights based on a specific pixels characteristics, such as screen position or normal, effectively reducing the necessary light source considerations per lighting calculation.

Tiled Deferred Shading does this by subdividing the screen into tiles, assigning lights for each tile. When performing lighting for a pixel in the deferred lighting pass, the shader will do a look-up in a light index texture that yields the culled light lists for that specific region of the screen.

Since deferred shading does have many drawbacks compared to forward shading, new variations of forward rendering have been developed as well. Forward+ is tiled forward rendering where screen space tiles are assigned culled lights.

A notable example of where Forward+ is used is the recently released game The Order 1886.

Clustered Shading

Clustered shading is a third light culling technique, but instead of working with tiles it uses so called clusters. Just as Forward+ and Tiled Deferred it subdivides the screen into tiles, but then a depth slicing is also made in the camera frustum. This yields 3D cells or “clusters” onto which lights are assigned. Clustered shading is about this all light culling process and the ability to query this culled light lists when performing shading, thus increasing performance. It also works with both forward and deferred rendering.

Currently, Stingray supports only spot and omni lights for clustered shading.

 

References

https://newq.net/dl/pub/SA2014Practical.pdf

http://gamedevelopment.tutsplus.com/articles/forward-rendering-vs-deferred-rendering–gamedev-12342

backlog:

“depth continuities”