June 2001

Incremental Tessellation -- Cont'd page 2
by Alex Macris

Let’s go back to our inner loop. From this loop point of view Dv is a constant vector (in fact a 4x4 matrix as each element of the vector is a set of XYZW coordivates) :

Dv[0] means Dv[0].XYZW

Now we express the inner loop in algebra (assuming that Ustep = 1 / number of vertices generated in the U direction):

Some clean up:

D is also constant. Now let’s see Vtxn+1:

 
This equation is of order 3. Let’s imagine it is of order 1:

Let’s imagine it is of order 2:

 
Now it’s not hard to imagine what an equation of order 3 looks like when expressed incrementally:

 
Of course, the question is...

The answer is coming, but let see what we’ve just done. At the start point, the cost was a quad-dot product. This means 3 Muls and 3 Adds (I drop the last Mul as it is 1*D[0]). After our work we are down to 3 Adds! This means that you can double the number of patches in your game!!! Just kidding! Don’t ever tell that to your graphic team!

The gain is even a bit more important as we don’t have to build the uVector. You could argue that this vector can be pre-calculated and replaced by a look up table.

Listing 2 shows the modification we’ve done.

<<<Back    Continue >>>

 

 

GIGnews is a publication of GIGnews.com, Inc.
"Get In the Game" is a registered trademark used with permission.

© 1
999- 2005 GIGnews.com, Inc.
Legal