Deferred Shading

In computer graphics, describes deferred shading ( engl. delayed or deferred shading) a method to separate the geometry processing, ie the representation of the physical shape of the objects of the lighting calculation in three-dimensional scenes. So are hundreds of dynamic lights possible in geometrically complex scenes. The basic idea is to compute a final pixel color value only after the depth resolution was first introduced by Michael Deering et al. Introduced in 1988. The now well-known concept comes from Saito and Takahashi 1990.

Principle

In classical rendering methods according to depth (depth ), orientation ( normals ) and color ( albedo ) determined a corner and color, intensity and angle of incidence of a light source, the final color value for each vertex. So each vertex must be used to calculate for each light source.

During deferred shading depth value, position and color of each pixel now be stored in one texture in screen size. This is called Multiple Render Targets allows, in each rendering process in different framebuffer objects ( textures) can be written simultaneously. Instead of that now each vertex to the light sources must be offset, each pixel only has ( in which all values ​​needed - depth, normals and albedo - present) are taken into account in the calculation.

The calculation itself is carried out by classical lighting models, such as Phong. It still shine light can also be included. Technically, this is done in the pixel or fragment shader at the end of the graphics pipeline.

Pros and Cons

If each light source must be matched with each vertex, we recognized a loss of yields (m is the number of primitives, n is the number of lights ), but the lighting is on the geometry calculation reduces the cost dramatically to. Thus, many hundred lights possible in complex scenes with moderate hardware requirements.

Due to the use of multiple render targets, however, one is limited to graphics hardware that supports at least Shader Model 3.0 (OpenGL version 2, DirectX version 9). In addition, the use of transparency in the scene is difficult, since a transparent material contains both its own information, and the information lying behind objects and so deceives the lighting model. This must be considered and avoided when programming.

Application

First implemented on graphics hardware application underwent deferred shading to 2004. Nowadays (2011) it is standard in most commercial real-time graphics applications and especially in games like STALKER, StarCraft II and Gears of War known.

225305
de