Graphics Reference
In-Depth Information
3. Render coordinate texture
tex2DCoordinates
(
N
Samples
×
N
Slices
,RG
32
F
),
epipolar camera-space
z
texture
tex2DEpipolarCamSpaceZ
(
N
Samples
×
N
Slices
,
R
32
F
) and set up stencil buffer
tex2DEpipolarStencil
(
N
Samples
×
N
Slices
,
D
24
US
8).
(a) The screen-space coordinates of each epipolar sample on the line are
computed by interpolating the line end points loaded from the
tex2D
SliceEndPoints
texture (Section 2.6).
(b) To compute the camera-space
z
coordinate for the sample,
tex2DCam
SpaceZ
texture is linearly filtered at the sample location.
(c) Stencil buffer
tex2DEpipolarStencil
is set up to mark only these sam-
ples that are located on the screen. This is implemented by setting
up increment stencil function and discarding those samples that fall
outside the screen.
4. For each valid epipolar sample, compute the coarse in-scattering integral
as described in Section 2.6 and store it in the
tex2DInitialInsctr
texture
(
N
Samples
×
N
Slices
,RGBA
16
F
).
(a) Stencil
tex2DEpipolarStencil
is used to cull all invalid samples.
(b) Trapezoidal integration with
N
Steps
= 7 provides a good trade-off
between accuracy and performance.
(c) Here we also render extinction texture
tex2DEpipolarExtinction
(
N
Samples
×
N
Slices
,RGBA
8
U
), which will be used to attenuate back-
ground.
5. Next, coarse in-scattering stored in the
tex2DInitialInsctr
texture is used
to refine sampling and compute interpolation source texture
tex2DInterpol
ationSource
(
N
Samples
×
N
Slices
,RG
16
U
). Details follow in Section 2.8.2.
6. After that, determine the slice origin and direction for each epipolar slice in
each shadow cascade as described in Section 2.7.2, and store them in another
auxiliary texture
tex2DSliceUVDirAndOrigin
(
N
Slices
×
N
Cascades
,RGBA
32
F
).
7. Min/max binary trees are then constructed as described in Section 2.7.2
andstoredinthe
tex2DMinMaxDepth
(
SM
Dim
×
(
N
Slices
·
N
Cascades
)
,RG
16
U
)
texture. Details follow in Section 2.8.3.
(a)
tex2DSliceUVDirAndOrigin
texture is used to fetch zeroth sample and
direction, compute locations of the required samples, and build the
first level.
(b) All coarse levels are then rendered.