Game Development Reference
In-Depth Information
3.1V IEWPORTS
Viewports represent rectangular areas of a render target unto which the game world is
rendered. A viewport consists of the properties top, left, width, height which describe the
dimensions of the window into the render target; typically applications will use the entire
size of the render target for fullscreen rendering, however, multiple viewports may be used
to render the view from different cameras, or to achieve certain effects.
Viewports also have properties that specify how much of the projected depth they can map,
these are a MinDepth and MaxDepth values that typically range from 0.0 to 1.0, meaning
thattheentiredepthrangecanbeusedbytheviewport.Somespecialeffectscanbeachieved
byusingdifferentdepthranges,forexamplesettingbothvaluesto0.0wouldforceobjectsto
be rendered in the foreground, setting both values to 1.0 would force objects to be rendered
in the background.
Figure 31 - A viewport defines an area of a render target.
Search WWH ::




Custom Search