Graphics Reference
In-Depth Information
Figure 9.4. Neighboring tiles blending down.
cause visual popping to become noticeable, detracting from the final result. The simplest
way to avoid this popping is to only transition between neighboring LOD levels, or in se-
vere cases, to consider vertex blending or other morphing enhancements.
This algorithm was published around the time that Direct3D 8 was current, and could
only use a single pair of index and vertex buffers. Consequently, it became a useful trick
to use DrawIndexedPrimitive() parameters to offset the base vertex for rendering each
patch, to avoid unnecessary state changes (an expensive operation with previous versions
of Direct3D). In addition, due to the small storage size required for an index, it was pos-
sible to store all unique combinations and simply tweak the draw call parameters to change
the LOD for each patch.
This means that there can be a great disadvantage, because of the potentially large
number of draw calls. The GPUs of the time could not dynamically select which index buf-
fer to use for each segment, so this had to be set up per-tile by the CPU, requiring a draw
call for each patch. Clearly, this is not good, given that developers spend significant effort
to reduce the number of these calls. The often-cited target of 500 or fewer draw calls per
frame thus effectively limits rendering to 484 tiles per frame in a 22x22 grid (sqrt(500) = 22.36,
which when rounded down to 22x22 is 484). The use of quad trees 1 and frustum culling 2
1 A two-dimensional terrain height-map would be subdivided in half along both the X and Y axis to produce
smaller tiles; each subdivision would then result in 4 new tiles. Being hierarchical allows for fast rejection or
acceptance of large areas of terrain.
2 Culling is a mathematical test to determine if geometry is visible given the current view properties.
Search WWH ::




Custom Search