Search code examples
directxgpudirectx-11tesselationtessellation

Which is faster: creating a detailed mesh before execution or tessellating?


For simplicity of the problem let's consider spheres. Let's say I have a sphere, and before execution I know the radius, the position and the triangle count. Let's also say the triangle count is sufficiently large (e.g. ~50k triangles).

Would it be faster generally to create this sphere mesh before hand and stream all 50k triangles to the graphics card, or would it be faster to send a single point (representing the centre of the sphere) and use tessellation and geometry shaders to build the sphere on the GPU?

Would it still be faster if I had 100 of these spheres in different positions? Can I use hull/geometry shaders to create something which I can then combine with instancing?


Solution

  • I just so happen to be working with this at the same time.

    In terms of FPS, the pre-computed method would be faster in this situation since you can dump one giant 50K triangle sphere payload (like any other model) and draw it in multiple places from there.

    The tessellation method would be slower since all the triangles would be generated from a formula, multiple times per frame.