It's like normal rendering but a little later
Before there where vertex and pixel shaders the the graphical pipeline on a GPU was fixed. It was possible to use functions to tweak a few parameters in different places but overall things moved forward in the GPU in a set order. You gave it the vertices, it did rasterization, put some texture on it, added some lightning and then triangles with colors fell out at the other end. With the ability to use shaders at the different stages it is no longer necessary follow the strict order of the old fixed function pipelines. Lighting can be done in the vertex shader, in the pixelshader or deferred to a second drawcall where we only do lighting. Rendering that is similar to the way fixed function graphical pipeline worked is called forward rendering, other techniques that shift things around are called deferred rendering. You can read up on some Deferred rendering history (2004) at Rich Geldreich website.
Pass: A pass is rendering of all the triangles in the scene.
Stages: Each step in rendering is called a stage. One or more of them can be a render pass that draw all the surfaces and update some information in the G-Buffer.
G-Buffer: The geometry buffer contains the data needed for the deferred rendering stages. It often need more then one render target to fit all data and it can get big.
- Compact Normal Storage for Small G-Buffers - 2009
- GBuffer helper – Packing integer and float together - 2018
- Notes on G-Buffer normal encodings - 2015
- Deferred Shading Tricks
L-Buffer: A buffer that accumulate the light of each pixel.
Forward Rendering - 19XY
The classic pipeline style is called forward rendering. When drawing the pixel shader texture and light the fragment and then it is written to the color buffer. So each triangle drawn need to have access to the lights that will affect it. On the CPU the geometry is grouped by what set of light affect them and each group is then drawn separately. This is easy for static light and geometry and harder when things start to move around. If a group is affected by more lights then can be used in single draw call blending need to be used and draw the geometry more then once.
for each object
for each light that can affect object
lighting += computeLighting(object, light)
Deferred shading - 2006
Deferred shading has three stages and need a G-Buffer and light accumulation buffer.
The first stage is a pass that fills in the G-buffer with all the material data and the things needed lighting. This makes the G-Buffer a bit large to fit in all the things needed.
A bounding volume is rendered for each light and the pixel shader use the G-Buffer data to calculate the lightning for the light source. The light output of all lights is gathered into a the L-Buffer.
The final stage is the shading stage. It takes the G-Buffer and L-Buffer as input and merge them to the final color buffer. This can be done with a single full screen quad.
- DirectX11 Deferred Shading - 2016
- Deferred Rendering Explained - 2015
- Forward Rendering vs. Deferred Rendering - 2013
- Simple OpenGL Deferred Rendering - 2013
- Deferred Rendering, Transparency & Alpha Blending - 2011
- Deferred Rendering Demystified - 2010
- Deferred Rendering - 2007
- Deferred Rendering in Killzone 2 - 2007
- GPU Gems 3 : Chapter 19. Deferred Shading in Tabula Rasa - 2006
- Chapter 9. Deferred Shading in S.T.A.L.K.E.R. - 2005
- Deferred Shading Tutorial - 2005
- Deferred Lighting and Shading - 2004
- Deferred Shading - 2004
Deferred lighting (light pre-pass rendering) - 2007
Deferred lighting do an extra pass to lower the size and bandwith off the G-Buffer.
This pass fills in the G-Buffer with the data needed for lighting only. It makes the G-Buffer smaller.
The same as in deferred shading.
A pass that renders all geometry again but this time it can use the L-Buffer to light each pixel.
Re-cap of Deferred Lighting - 2013
Deferred Rendering - 2012
Light Pre-Pass: Knee-Deep - 2009
Prelighting - 2008
Light Pre-Pass Renderer - 2008
Deferred lighting approaches - 2009
“A Bizarre Way to do Real-time Lighting”, - 2009
Light Indexed Deferred Rendering - 2007
The first stage is a early-z pass used to fill in the depth values. The next stage renders the lights and write down the index of each light into a light buffer. The size of the buffer per fragments limits how many lights can be on a single fragment and also the whole screen. All the lights information then need to be put into a texture or constant where the last stage, a render pass can read it and use it to light the fragment.
Tiled deferred shading - 2011
Create a G-Buffer like in normal deferred shading. Split the screen into tiles and the sort lights into the tiles they touch in screen space. As a final step, for each fragment sample the gbuffer and the use the lights in the tile the fragment is in to light and shade the pixel.
- Tiled Deferred Shading - 2015
- Tiled deferred shading tricks - 2014
- Charlie & The Compute-Shader factory #3: Tiled Deferred Lighting - 2013
- Tile-based Deferred and Forward Lighting - 2012
- Tiled Shading - 2011
- Deferred Shading Techniques using Frostbite in ”Battlefield 3” and "Need for Speed The Run” - 2011
- SPU Based Deferred Shading in Battlefield 3 for Playstation 3 - 2011
- The Technology of Uncharted: Drake’s Fortune GDC - 2008
Clustered deferred shading - 2012
Create a G-Buffer like in normal deferred shading. Sort the fragments into clusters and then sort lights into the clusters they touch in 3D. As a final step, for each fragment sample the gbuffer and the use the lights in the clusters the fragment is in to light and shade the pixel.
Tiled Light Trees - 2017
Clustered Deferred and Forward Shading - 2012 http://youtu.be/6DyTk7917ZI
Tiled Forward / Forward+ - 2012
Bin lights into 2D tiles on the screen. Then a forward renderer use these bins in the pixel shaders to apply the lights.
Cull that cone! - 2017
Tiled Forward Shading Links - 2012
Tiled Shading - 2011
Deferred Texturing - 2013
Only a material Id and the data for lighting is written down to the G-Buffer. Then a full screen shader is used to read the id and texture the screen. The upside is that only areas that are really visible need to access the data for textures.
Transparens i en deferred pipeline : - 2010
Volume Tiled Forward Shading - 2017
Hybrid Deferred Rendering - 2013
Notes on real-time renderers - 2014
Tiled Light Trees - 2017