|
|
|
Here we
show the block structure of the clipmaps.
|
|
Each
clipmap level of size nxn is represented by 16 blocks of size n/4xn/4 and a
few more blocks o patch up the gaps between the blocks.
|
|
We
create 1 index and vertex buffer for the block and reuse it for all levels,
and within a level. The vertex buffer consist of x,y values which can be
translated to different parts of the clipmap and then scaled based on the
level it belongs to. The z value comes from a texture lookup in a 1 channel
vertex texture containing the z value.
|
|
|
|
These
blocks are made up of triangle strips whose lengths give optimal vertex
caching.
|
|
Generally
the clipmap is of size 255x255 leading to a block size of 64x64. In this case
we found that a strip length of 22 was optimal for good cache performance on
the GeForce 6800.
|
|
|
|
In
addition to these blocks we need a few more blocks to fill in the holes
between them shown here in green.
|
|
|
|
We also
have an L shaped strip of triangle on inner perimeter of ring shown in blue.
The location of this strip location varies with the viewpoint.
|
|
we
render one of 4 static geometry buffers.
|
|
|
|
Finally,
we have line of degenerate triangles on outer perimeter to avoid T-junctions
with next coarser level here shown in red.
|