Graphics Reference
In-Depth Information
3 rd pass
1 st pass
2 nd pass
Ray
Marching
Intersection
Testing
Intersection found,
ray terminated
Intersection found,
ray terminated
Figure 2.5. Three-pass intersection testing. Each pass builds a different partial ray grid
(ray links are marked in the color of the rays). The red ray intersects a triangle in the
first pass and is no longer considered afterward (grayed-out). The voxel representation
of the scene is underlaid in grey to improve readability.
2.4 Implementation
In the following, we provide details on the implementation of our method. While
some remarks may be specific to DirectX 11, everything that is required has its
counterparts in other GPU programming APIs and thus can easily be imple-
mented in different environments just as well.
2.4.1 Voxelization
We make use of voxelization both to build the coarse voxel representation of the
scene and to identify overlapped ray grid cells during intersection testing. In
both cases, voxelization has to be conservative, i.e., every voxel fully or partially
overlapped by a triangle needs to be identified. Thus, we ensure that a voxel
fragment (pixel shader thread) is generated for every voxel touched by a primitive.
Otherwise, we could miss intersections with the rays of cells that are only partially
overlapped.
Projection to 2D rasterization. We have implemented conservative voxelization in
the standard graphics pipeline, similar to [Crassin et al. 11]. We use the hardware
rasterizer to rasterize primitives into a two-dimensional othographic projection
Search WWH ::




Custom Search