Multiple Render Targets
   HOME

TheInfoList



OR:

In the field of
3D computer graphics 3D computer graphics, sometimes called Computer-generated imagery, CGI, 3D-CGI or three-dimensional Computer-generated imagery, computer graphics, are graphics that use a three-dimensional representation of geometric data (often Cartesian coor ...
, Multiple Render Targets, or MRT, is a feature of modern
graphics processing units A graphics processing unit (GPU) is a specialized electronic circuit designed for digital image processing and to accelerate computer graphics, being present either as a discrete video card or embedded on motherboards, mobile phones, personal co ...
(GPUs) that allows the programmable
rendering pipeline The computer graphics pipeline, also known as the rendering pipeline, or graphics pipeline, is a framework within computer graphics that outlines the necessary procedures for transforming a 3D computer graphics, three-dimensional (3D) scene into ...
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 sp ...
or as texture maps applied to 3D models. Introduced by
OpenGL OpenGL (Open Graphics Library) is a Language-independent specification, cross-language, cross-platform application programming interface (API) for rendering 2D computer graphics, 2D and 3D computer graphics, 3D vector graphics. The API is typic ...
2.0 and
Direct3D Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware ...
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 of a 3D scene—a process known as '' shading''. Shaders have evolved to perform a variety of s ...
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 (computer graphics), rendering pass, after the vertex and pixel shaders are rendered. It was first suggested by ...
, 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 In geometry, a normal is an object (e.g. a line, ray, or vector) that is perpendicular to a given object. For example, the normal line to a plane curve at a given point is the infinite straight line perpendicular to the tangent line to the c ...
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 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 occlude ...
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 (computer graphics), rendering pass, after the vertex and pixel shaders are rendered. It was first suggested by ...
, 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 object's ...
process that relies heavily on MRT to perform in real-time 3D rendering {{Compu-graphics-stub