OpenGL 3 & DirectX 11: The War Is Over


The major new feature of Direct3D 10 was the appearance of Geometry Shaders, which finally made it possible to create or destroy vertices on the GPU. But the role of this unit has been somewhat misinterpreted. Rather than being used for massive expansion of geometry, it’s better suited to implementing more flexible Point Sprites, managing Fur Shading, or calculating the silhouette of an object for shadow volume algorithms. Nothing is better than a dedicated unit for doing tessellation. Initially planned for Direct3D 10 (which explains its presence in the Radeon HD series), it seems that Microsoft, ATI, and Nvidia weren’t able to reach an agreement in time, and so it disappeared from the specifications, only to return with a vengeance with Direct3D 11. So, tessellation is the big new feature of Direct3D 11—or at least the one that’s easiest to sell for non-specialists.

So, Microsoft has introduced three new stages in its rendering pipeline:

Unlike other stages of the pipeline, these don’t operate with triangles as primitives, but use patches. The Hull Shader takes the control points for a patch as input and determines certain parameters of the Tesselator, such as, for example, TessFactor, which indicates the degree of fineness of the tessellation. The Tesselator is a fixed-function unit, so the programmer does not control how tessellation is calculated. The unit sends the points generated to the Domain Shader, which can apply operations to them. An example should make all this clearer. Let’s take a case that has come up in each generation since Matrox’s Parhelia—Displacement Mapping.

As input to the vertex shader, we have the control points of the patch. The programmer can manipulate these as he or she sees fit, since they aren’t numerous. To simplify, they are a very coarse version of the final mesh. These transformed points are then passed to the Hull Shader, which determines how many times to subdivide each side of the patch (for example, as a function of the size of the patch in pixels on the display). The Tesselator handles tessellation as such. That is, the creation of the geometry, which is passed to the Domain Shader. It transforms the points generated into the appropriate space (the points exiting the Tesselator are in the space of the patch), producing classic vertices that it can displace as a function of a texture and perform Displacement Mapping.

The potential is enormous. Thanks to tessellation, it becomes possible to do without the normal map and implement a level of detail directly on the GPU, allowing the use of very detailed models (several million polygons instead of 10,000 or so with current games)—at least in theory. In practice, tessellation raises some problems that have kept the technique from taking off so far. Can Direct3D 11 and compatible cards avoid these pitfalls and come up with a functional version? It’s too early to say, but in any event not everybody is convinced, and id Software is working on solving the same geometry problem with a completely different approach based on ray casting with voxels.

Create a new thread in the UK Article comments forum about this subject
This thread is closed for comments
Comment from the forums
    Your comment
  • mi1ez
    So, is the tesselation stage similar to AF or bi/trilinear filtering?
  • JDocs
    Tesselation, from what I've seen, takes a simple model intended for say a 4650 and "upgrades" it in memory making it more complicated and details for higher end cards. If I understand this correctly it will drastically reduce development time and costs while increasing visual quality.
  • Anonymous
    Hmm, not sure about "upgrading" in memory. I looks like it just lets you pass in the control points that define your geometry rather than passing in all vertices for the mesh, which you yourself would probably have defined in a similar manner anyway.
  • Anonymous
    Direct3D remains utterly irrelevant to me as a Linux user.
  • bobwya
    shrugDirect3D remains utterly irrelevant to me as a Linux user.

    But it is relevant to a lot of GNU/Linux users as the Wine programmers have to compatiblise what M$ implements in their 3D API... Currently they are making a dogs dinner of DirectX 9.0 support. However Windows games are generally well supported if they have an OpenGL option... Far Cry for example will not render under Wine in DirectX mode but when switched to OpenGL it works very well.

    It is sad to hear about the difficulties OpenGL is having therefore.

  • Scooby2
    Tessellation as far as I'm aware is adding more triangles to a model to give smoother surfaces over curves. It does not add any visual details but does add to the complexity of the model.
  • Scooby2
    adding more triangles

    It breaks down the existing geometry into smaller triangles. (most 3d models are built out of triangles to begin with)
  • mayones
    Very good aricle, thanks! I'm an OpenGL developer as well, and I wish it the best. I think that now, OpenGL needs money and commercial support - unfortunately these are the rights of current world. It would be a shame to have only one modern 3D API...
  • marmot
    "the professional market, where OpenGL is the standard"
    what market are you talking about? Please detail. Your readers are mostly common computer users, not specialsts knowing in-depth details about the computer graphics market.

    "Since the ARB—the group in charge of ratifying the API’s development—included many different, competing companies.."
    What are the most important members of this ARB? Whose words have big weight in that group? The readers might be curious - who are the people generating the conflicts that slow down the OpenGL evolution?

    And by the way, why ATI and nVidia don't just take care about OpenGL and ignore that silly ARB? If they can't because of patents and such, they should make a new API from the scratch. Im pretty sure they are more than capable of it.
  • sckoobs
    The problem with OpenGL is that industry users (e.g. CAD and scientific users) are opposed to change in the API which is blatantly against the ethos of the games development community. Industry users have already spent a lot of money on the OpenGL apps, so naturally they don't want the features they use to die. I think that what Khronos has done to date is the most logical route to take given the constraints they are working within.

    The ideal solution would be to cut any ties that lead to a conflict of interest and pursue untainted API refreshes as they had originally promised.

    As a cross-platform developer I want OpenGL to be a true competitor to D3D, I don't use anywhere near the full feature set of what current versions provide but if it looses at the top end, support will dwindle and the bottom end will also be affected.
  • khelben1979
    If OpenGL even have a chance of competing against DirectX 10, then I'm more than impressed! OpenGL is the way to go for Linux and I and many others with me would like to use Linux as an gaming platform instead of Windows.

    I'm very tired of using Windows and I don't like the operating system. It works, but it isn't very fun, unlike Linux which IS a enjoyable experience and feels fast even on old computer hardware, unlike Windows which never get the power it needs.