ABSTRACT

The process is depicted in Figure 5.1. We start with transforming the mesh’s vertices using Stream Out. The vertices are skinned and transformed into the partitioning volume space. This helps us prevent unnecessary transformations in subsequent draw calls. Next, we partition the mesh triangles by rearranging their locations according to cell placement. This operation is similar to sorting and results in a continuous triangle buffer. The cells without triangles are not represented in the buffer; thus a map is required for efficient access. This map is built in the third step. After it is ready, the particle system gets advanced using the buffer and the map in order to account for interaction with the dynamic mesh.

5.3 Sorting the Triangles The mesh is partitioned into cuboid cells using a set of Stream Out draw calls. In order to avoid the necessity of moving all the vertex data while partitioning the mesh, the process is done on index level. The indices of the mesh and the partitioning information are organized into a structure T (Figure 5.2), which conveniently fits into a R16G16B16A16_UINT value. To accelerate the process while maintaining a reasonable amount of draw calls, a binary partitioning scheme is used. Following are the steps that lead to partitioning of the triangles along the x-axis: