Multiple Render Targets
   HOME

TheInfoList



OR:

In the field of
3D computer graphics 3D computer graphics, or “3D graphics,” sometimes called CGI, 3D-CGI or three-dimensional computer graphics are graphics that use a three-dimensional representation of geometric data (often Cartesian) that is stored in the computer for t ...
, Multiple Render Targets, or MRT, is a feature of modern
graphics processing units A graphics processing unit (GPU) is a specialized electronic circuit designed to manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, mob ...
(GPUs) that allows the programmable
rendering pipeline In computer graphics, a computer graphics pipeline, rendering pipeline or simply graphics pipeline, is a conceptual model that describes what steps a graphics system needs to perform to  render a 3D scene to a 2D screen. Once ...
to render images to multiple render target textures at once. These textures can then be used as inputs to other
shaders In computer graphics, a shader is a computer program that calculates the appropriate levels of light, darkness, and color during the rendering of a 3D scene - a process known as ''shading''. Shaders have evolved to perform a variety of speci ...
or as texture maps applied to
3D models In 3D computer graphics, 3D modeling is the process of developing a mathematical coordinate-based representation of any surface of an object (inanimate or living) in three dimensions via specialized software by manipulating edges, vertices, an ...
. Introduced by OpenGL 2.0 and Direct3D 9, MRT can be invaluable to real-time 3D applications such as video games. Before the advent of MRT, a programmer would have to issue a command to the GPU to draw the 3D scene once for each render target texture, resulting in redundant vertex transformations which, in a real-time program expected to run as fast as possible, can be quite time-consuming. With MRT, a programmer creates a
pixel shader In computer graphics, a shader is a computer program that calculates the appropriate levels of light, darkness, and color during the Rendering (computer graphics), rendering of a 3D scene - a process known as ''shading''. Shaders have evolved ...
that returns an output value for each render target. This pixel shader then renders to all render targets with a single draw command. A common use of MRT is
deferred shading In the field of 3D computer graphics, deferred shading is a screen-space shading technique that is performed on a second rendering pass, after the vertex and pixel shaders are rendered. It was first suggested by Michael Deering in 1988. On t ...
, a shading process which, unlike forward shading, performs lighting calculations on an entire 3D scene at once instead of on each individual object. To do this in real-time, MRT is used to store the required information for the lighting calculations in multiple render targets, which are then used after the entire scene has been drawn to calculate the lit final image. Typically one render target holds color and surface information of objects, while another contains the surface normals and depth information of the scene which are used to calculate the reflection of light. Additional render targets can be used to store information such as the
specularity Specularity is the visual appearance of specular reflections. In computer graphics In computer graphics, it means the quantity used in three-dimensional (3D) rendering which represents the amount of reflectivity a surface has. It is a key com ...
of the surface and
ambient occlusion In 3D computer graphics, modeling, and animation, ambient occlusion is a shading and rendering technique used to calculate how exposed each point in a scene is to ambient lighting. For example, the interior of a tube is typically more occluded ...
data.


See also

*
Deferred Shading In the field of 3D computer graphics, deferred shading is a screen-space shading technique that is performed on a second rendering pass, after the vertex and pixel shaders are rendered. It was first suggested by Michael Deering in 1988. On t ...
, a
shading Shading refers to the depiction of depth perception in 3D models (within the field of 3D computer graphics) or illustrations (in visual art) by varying the level of darkness. Shading tries to approximate local behavior of light on the ob ...
process that relies heavily on MRT to perform in real-time 3D rendering {{Compu-graphics-stub