Jump to content

Deferred shading

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 24.205.201.178 (talk) at 14:25, 21 January 2010 ("into" makes more sense in this context -- I am a M.S. student in Computer Science studying graphics). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer graphics, deferred shading is a three dimensional shading technique in which the result of a shading algorithm is calculated by dividing it into smaller parts that are written to intermediate buffer storage to be combined later, instead of immediately writing the shader result to the color framebuffer. Implementations on modern hardware tend to use multiple render targets (MRT) to avoid redundant vertex transformations. Usually once all the needed buffers are built they are then read (usually as input textures) into a shading algorithm (for example a lighting equation) and combined to produce the final result. In this way the computation and memory bandwidth required to shade a scene is reduced to those visible portions, thereby reducing the shaded depth complexity.

This primary advantage of deferred rendering is mitigated by the availability of coarse Z-buffer and early Z-buffer testing, however other advantages are still claimed for the approach. These advantages may include the simpler management of complex lighting resources, ease of managing other complex shader resources and the simplification of the software rendering pipeline. These are somewhat more marginal advantages that software developers decide on during their development process and they are endlessly debated.

One key disadvantage of deferred rendering is the inability to handle transparency within the algorithm, although this problem is a generic one in Z-buffered scenes and it tends to be handled by delaying and sorting the rendering of transparent portions of the scene.[1]

Another rather important disadvantage is that, due to separating the lighting stage from the geometric stage, hardware anti alias does not produce correct results any more: although the first pass used when rendering the basic properties (diffuse, normal etc.) can use anti alias, it's not until full lighting has been applied that anti alias is needed. One of the usual techniques to overcome this limitation is using edge detection on the final image and then applying blur over the edges.[2]

The technique is increasingly being used in video games because of the control it enables in terms of using a large amount of dynamic lights and reducing the complexity of required shader instructions. Sony Computer Entertainment has several games that use deferred rendering include Guerilla Games's Killzone 2, Media Molecule's LittleBigPlanet, and Sucker Punch Productions' inFamous. Other games known to use deferred shading are GSC Game World's Stalker: Shadow of Chernobyl, Electronic Arts' Dead Space[3], NCSoft's Tabula Rasa[4], Realtime Worlds' Crackdown and Rockstar Games' Grand Theft Auto IV. Crytek's CryEngine 3 also implements deferred lighting.[5]

History

The idea of deferred shading was originally introduced by Michael Deering and his colleagues in a paper[6] published in 1988 entitled The triangle processor and normal vector shader: a VLSI system for high performance graphics.[7] Although the paper never uses the word "deferred", the concept that is presented therein, which is only recently becoming practical for applications such as video games, is the same as the idea widely referred to as deferred shading, or deferred lighting, in computer graphics circles today.[8]

References

  1. ^ "NVIDIA SDK 9.51 - Featured Code Samples". NVIDIA. 2007-01-17. Retrieved 2007-03-28.
  2. ^ "Deferred shading tutorial" (PDF). Pontifical Catholic University of Rio de Janeiro. Retrieved 2008-02-14.
  3. ^ "Dead Space by Electronic Arts". NVIDIA. Retrieved 2008-02-14.
  4. ^ "Deferred shading in Tabula Rasa". NVIDIA. Retrieved 2008-02-14.
  5. ^ "CryENGINE 3 Specifications". Crytek GmBH. Retrieved 2009-03-12.
  6. ^ Deering, Michael. "The triangle processor and normal vector shader: a VLSI system for high performance graphics". ACM SIGGRAPH Computer Graphics. 22 (4). ACM Press: 21–30. {{cite journal}}: Unknown parameter |coauthors= ignored (|author= suggested) (help)
  7. ^ "Deferred Shading" (PDF). NVIDIA. Retrieved 2007-03-28.
  8. ^ Klint, Josh. "Deferred Rendering in Leadwerks Engine" (PDF). Leadwerks. {{cite journal}}: Cite journal requires |journal= (help)

See also