Graphics Reference
In-Depth Information
map, and we will also know the reflected vector that we are looking up. These are precisely
the incident and reflected vectors that we used while performing the paraboloid projec-
tion. Thus, we can use Equation (13.7) and add these two vectors, and divide the result
by its z-component. The resulting x and y coordinates will then indicate the location in the
paraboloid map to sample in order to recreate the reflection. This completes the lookup
process, and allows us to use our paraboloid maps to approximate what would be seen in
the reflected scene.
13.2 Implementation Design
With the theory of paraboloid mapping clearly defined, we can now consider how best
to implement this technique in the Direct3D 11 rendering pipeline. We will consider two
different operations: the generation of the paraboloid maps, and the subsequent use of the
paraboloid maps during a rendering pass. In addition, we will also consider how to perform
both operations at the same time, such as when rendering one reflective object into another
reflective object's paraboloid maps.
13.2.1 Resource Selection
Before filling and using our paraboloid maps, we must first decide what would be the most
appropriate resource format to use. The paraboloid maps themselves are 2D projections of
the scene around them, and thus a 2D texture is the natural choice. However, we still have
some freedom to choose how our two paraboloid maps are associated with one another. At
first thought, we could use one 2D texture resource for each of the two paraboloid maps
that are needed. Unfortunately, we can't use MRT rendering to fill both render targets si-
multaneously, since each object will appear in a different location in each of the paraboloid
maps. Furthermore, to allow for proper depth sorting with the depth buffer, we need to have
unique depth buffers for each paraboloid map.
However, there is still a way to use some of the newer features of Direct3D 1 1
to fill both paraboloid maps with a single rendering sequence. If we create a two-ele-
ment 2D texture array, we can contain both the front and back paraboloid maps within
a single resource. With both maps accessible in the same resource, we can use the SV_
RenderTargetArraylndex system value semantic to dynamically determine in the geom-
etry shader which render target element to send a batch of geometry to. This will let us pass
different versions of the geometry to each paraboloid map from within a single draw call.
This is a good enough reason to choose the 2D texture array resource type. However,
this rendering technique also allows the use of another feature of Direct3D 11 to further
Search WWH ::




Custom Search