Deferred Shading is an alternative rendering technique for 3D scenes. The traditional rendering approach, often called Forward Rendering, will render an object once for each light affecting it. So if a model has 4 lights affecting it, it will be rendered 4 times. Since each surface needs to be drawn again for every light affecting it there are many redundant draws, triangles, and pixel operations.
Deferred Shading was invented to solve some of these problems, it involves all objects rendering their lighting related information to a texture called the G-Buffer. This holds things such as their colours, normals, depths and any other information that is relevant to calculating their final colour. Each light then uses the G-Buffer to compute the final image. Using deferred shading, hundreds of lights can be rendered in a scene at once.
The G-Buffer used in Killzone 2 |
Some of the main disadvantages to using Deferred Shading are:
- The G-Buffer takes up a lot of memory
- Transparency is much more difficult
- Anti Aliasing is near impossible on DX9 or less hardware
Recent popular games to use Deferred Shading:
- Brink
- Battlefield 3
- Crysis 2
- Deadspace 1/2
- GTA IV
- Halo Reach
- Killzone 2/3
- LittleBigPlanet
- Red Dead Redemption
- Starcraft II
Further reading:
http://en.wikipedia.org/wiki/Deferred_shading
http://graphicrants.blogspot.com/2008/08/deferred-rendering.html
http://www.gamedev.net/page/reference/index.html/_//feature/fprogramming/deferred-rendering-demystified-r2746
http://www.ogre3d.org/tikiwiki/Deferred+Shading
http://gameangst.com/?p=141
http://www.gamerendering.com/2008/11/01/deferred-lightning/
Deferred rendering in Killzone2:
http://www.guerrilla-games.com/publications/dr_kz2_rsx_dev07.pdf
Light pre-pass alternative:
http://gamedevcoder.wordpress.com/2011/04/11/light-pre-pass-vs-deferred-renderer-part-1/
http://mquandt.com/blog/2010/03/light-pre-pass-round-2/
No comments:
Post a Comment