190 12.AGenericMultiviewRenderingEngineArchitecture
surface is later updated with the composite image generated by the attached mul-
tiview compositor. If the composition (merge) step of the multiview display de-
vice requires that complex patterns be sampled from each view, as is common in
lenticular-based displays, or if the per-view outputs need to be stored in separate
resources with different configurations (sizes, component types, etc.) as a mul-
tiview optimization step, using an off-target multiview buffers is required.
Some additional aspects of off-target buffer configurations are the following:
■ The color channel targets need to be separated for each view.
■ The depth and stencil targets can be shared between different views if the
view-specific images are rendered sequentially. Clearing depth/stencil buff-
ers after rendering has been completed for each view ensures that each view
has its own consistent depth/stencil buffer.
■ Specific to OpenGL, a multiview buffer can be assigned a single frame buff-
er, as opposed to switching frame buffer objects in each view, and the texture
attachments may be dynamic. Rendering performance may differ depending
on the hardware and the rendering order used.
■ For off-target buffers, the sizes of internal render surfaces are based on the
attached viewport render surface size since the internal view-specific surfac-
es are later merged into the viewport render surface.
■ The multiview buffers can apply additional level-of-detail settings. Possible
approaches are discussed in Section 12.8.
12.6TheMultiviewCompositor
The multiview compositor component is responsible for merging a given off-
target multiview buffer (the render data for specific views) into the target view-
port, and it can also be used to define view-specific rendering states. Since the
compositing logic is heavily dependent on the target hardware configuration, our
architecture supports an extensible multiview compositor design, allowing the
programmer to define hardware-specific view-merge routines by inheriting from
a base class interface.
The composition phase requires that a multiview buffer provide the rendering
results of the different views in separate render targets. Thus, when an on-target
multiview buffer is used, there is no need to define a compositing method. Yet,
using an off-target multiview buffer and multiview compositor provides a more
flexible mechanism, while introducing only slight data, computation, and man-
agement overheads.