(1) Can you start please with some background on how you are using DirectX 11 in the Frostbite 2 engine? What made you decide to jump onboard with DirectX 11?
We’ve been part of the DirectX 11 development from a _very_ early stage, a few years before there was an internal prototype available even. This helped us make sure that many of the features & improvements that are important for us got in — so that we have what we need to make the best possible PC games in the future.
There are 2 different areas where we are using DirectX 11 in Frostbite 2. The first is to streamline and optimize the CPU performance; how our engine & games communicate with D3D to take advantage of multiple CPU cores. This has become a bigger and bigger problem with previous D3D versions as GPU performance has been scaling and the CPUs have gotten more cores, but without us being able to utilize them for rendering with D3D.
Now in DirectX 11, with the new support for multi-threading in the API, we can render objects and submit it to the GPU in parallel on all available CPU cores (we’ve tested up to 16 virtual cores). This will be a big performance improvement and allow us to have much more variation and detail on our levels while costing less than before.
The multi-threading support also enables us to get faster loading times by loading shaders and other resources in parallel and to efficiently stream in textures & meshes without stalls, which would otherwise result in unwanted jerky performance in the game.
The second area of DirectX 11 that we are using includes some of the new hardware features such as compute shaders. We use compute shaders for deferred shading, which enables us to have many more all-dynamic light sources than we’ve been able to have before. We also see a big potential for using compute shaders for other future effects and optimization techniques.
(2) Can you share any details of how you plan to use DirectCompute 11 to implement deferred shading? What does that mean in terms of how your games would look or perform? Can you think of other way you might use DirectCompute 11?
Our plan is to improve performance and at the same time be able to have many more dynamic light sources than we’ve been able to have previously — and by a wide margin even. This is possible as the culling & processing of large light sources can be done much more efficiently and directly in a compute shader compared to traditional deferred rendering techniques.
I did a talk at the Siggraph’09 “Beyond Programmable Shading” course that described this technique a bit more in depth, the slides for the talk are available here: http://repi.blogspot.com/2009/08/siggraph09-parallel-graphics-in.html
At Siggraph we also showed a demo of a scene in Frostbite 2 with 1000 large overlapping dynamic light sources flying around which ran on an ATI Radeon HD 5850 card with very good performance.
There are many other interesting uses for compute shaders, for example many post-processing effects are a very good fit such as fast screen-space ambient occlusion, doing large blur kernels and accurate depth of field.
(3) The other big new hardware feature of DirectX 11 is the tessellator. Can you tell us about your plans for that and is it really a big deal?
Tessellation is a new big piece of technology in DirectX 11 and something that we are excited about. Tessellation combined with displacement mapping is a very powerful tool that can dramatically increase the detail of our objects and still render them very efficiently by varying the level of detail dynamically.
The primary areas that we are looking into using tessellation in the future are:
- Smooth / round objects (for example vehicles and their wheels)
- Very bumpy objects such as cobblestones and rocky terrain
- Characters
One difficulty however with tessellation and esp. displacement mapping is that it requires changes to the whole content authoring pipeline step and how our artists build objects. So it isn’t as easy to use as some of the other DX11 features, but definitely one of the more powerful features going forward.
(4) Take up of DirectX 10 in games was pretty slow – do you think the same might be true this time around with DirectX 11? [Please give your reasons for your answer.]
Yes I agree that the transition to DirectX 10 was slow. One of the main reasons for this, in my view, was that it was tied into Windows Vista which unfortunately had lower adoption than one would have hoped for (from our perspective).
This tie in was, however, necessary for technical reasons, as DirectX 10 got a much needed clean slate implementation and a new driver model which was required to continue on.
Now with DirectX 11 and Windows 7 we have a very different, and much better, situation for 3 reasons:
- DirectX 11 isn’t limited to Windows 7, it will also work on Windows Vista so everyone that is already using Vista will be able to use it. This is a huge benefit for everyone involved.
- Windows 7 is an excellent OS for gamers (but please use the 64-bit version!) and I predict a vast amount of the gamers that are still on Windows XP, which is now a 8 year old operating system, will upgrade to Windows 7 and as such go directly from DirectX 9 to DirectX 11 awesomeness.
- Thirdly, many game developers have also been “stuck” on DirectX 9 and Windows XP as this have been the primary and very large user base that they have been developing for. This created a Catch-22 situation as many gamers didn’t see the benefit of upgrading to Windows Vista & DirectX 10 as there were few games that supported it fully.
Now with Windows 7 and DirectX 11, it feels like there are a lot of developers that are planning to make the jump directly from DirectX 9 to DirectX 11, which will help solve this Catch-22 situation and provide gamers with another great reason to upgrade.
(5) Can you confirm that the new techniques that you develop using DirectX 11 now on AMD hardware will be used in multiple future titles?
We have over a long time, since the absolute first early internal versions of DirectX 11, been working with it and building in support into the Frostbite 2 engine to fully utilize it.
And yes, these techniques and support will be used for multiple game titles as our technology foundation here at DICE going forward.
(6) What is OIT, why is “OIT” a big deal for you guys, and does DirectX 11 give you a solution to the problem?
OIT (“order-independent transparency”) is a solution to an age old problem in real-time graphics: How to render transparent surfaces and have them be correctly sorted against each other to look right. This is a very difficult problem to solve efficiently, and it has limited the way we create content in games where we have to be very restrictive of how we use transparent surfaces and how they interact with each other.
Now with DirectX 11 it has finally become possible to implement correct order-independent rendering of transparent surfaces (OIT). By taking advantage of that, pixel shaders can do atomic operations and scattered writes out into memory to collect multiple “layers” of the transparent surfaces. These layers are then sorted and correctly blended together using a compute shader.
We are interested in the possibilities that this opens up for us, where our artists can create content in totally new ways that was next to impossible before. For example having glass objects scattered around and inside glass buildings or having particle effects in-between windows of vehicles & buildings without getting sorting issues or rendering artifacts.
Although, as many of our games are competitive online games, we also must be very careful here as it wouldn’t be fair if a person with a DX11 card gets to see through glass buildings while someone with a DX10 card cannot. That would not be lead to good balanced game play.
(7) The ATI Radeon HD 5870 is the world’s most powerful GPU that you can buy today – and it has almost 3 Teraflops of compute power. That’s great for Hi-Definition gaming… But how much do you think you need for eye-definition gaming, and when do you think the good folks at AMD will finally be able to satisfy your demands for more horsepower or does this go on forever?
Give me 2-3x the computer power and 2 GB video memory (for frame buffers & textures) and we’ll deliver the eye-definition resolutions for our future high-end full DX11 games in highest possible level of detail. Fortunately, I’m optimistic that AMD will get there quite soon!
We want this development of ever more powerful GPUs to continue for a _long_ time forward. There are simply too many interesting techniques and opportunities both within real-time graphics and general compute for games going forward. Techniques that require enormous amounts of horsepower to be able to implement or improve upon to create the life-like interactive environments we and the gamers want in our games.
If this development continues on for next to forever (or say the next 20-30 years), until we reach a “Star Trek holodeck” / “The Matrix” level of interactivity and visuals – then that’s more than fine with me!
(but let’s skip the evil AI, ok?)
(10) AMD seems to have taken the world by surprise with the early release of DirectX 11 hardware. What has been your experience of the HD 5870 so far?
The HD 5870 is a very impressive graphics card, both in pure raw performance and with the support for all the new DirectX 11 functionality. The drivers are very robust and the few issues we’ve had have been fixed quickly.