Back in GDC 2014 Microsoft formally unveiled it was working on DirectX 12, which would be the focus of radical changes to Microsoft’s flagship API. Taking a rather Mantle (or console) like approach, it would provide control to the GPU and allows developers access to lower level functions of the hardware. Combine this with a vast improvement on multi-threading and Microsoft’s DX12 picked up a lot of buzz in the media.
We’ve known there’d be new features in DX12 for some time now, and indeed Microsoft have even revealed a few of those very features are found in the Xbox One’s API, but a lot of what they’re doing has been shrouded in mystery. While the secrecy isn’t a surprise, it is rather frustrating for tech enthusiasts – or even regular PC gamer’s for that matter, who’re wondering what direction Microsoft will be pushing the platform in.
Why do we need DirectX 11.3
You can be easily forgiven if you’re confused as to why Microsoft are introducing the world to DX11.3. Despite all of the pushing and shoving from developers, gamer’s and even the media for a low level API solution for the PC, not every game requires low level function. As we’ve highlighted in our previous DirectX 12 analysis, DX12 requires a lot more ‘effort’ from programmers to get the most out of. The whole purpose of DirectX was to provide a common ground for game engines to communicate with the GPU.
That is, the game tells D3D what to do, then D3D translates this to the GPU’s drivers and the trio of them go on having a merry old time. It’s far simpler to program for. There’s also less chance of causing crashing or errors for inexperienced programmers who’ve allocated memory wrong, or just plain haven’t taken into account a particular GPU architecture. You can imagine how this would cause smaller game studios to struggle, they likely don’t have the share people power required to make DX12 low level a reality, at least until we’re all more familiar with it.
And then there’s the other argument – if you’re creating a fairly simple title – graphically at any rate, why would you need to put in all of that time or effort to perform such level of optimization. If you were to take a peak at the PC hardware specs of many modern titles out there, particularly indie or console ports, the hardware demands are fairly modest.
Sure, game engines like very impressive (and yet still in development) Unreal Engine 4 will do a lot of the work for developers, but in the end they’ll still have to do a lot of manual work. So, in the end Microsoft know ditching a ‘high level and abstraction’ approach completely isn’t a good idea. It’d likely prompt a lot of panic from indie developers, or force them to switch to another API.
Chances are good you’ve heard about Feature Levels in DIrectX. In a nutshell, this allows the same code to run across different generations of GPU’s. In essence, if user A has a DX10 GPU, and user B has a DX11 GPU, you’ll not need to bloat your code by trying to write code for each API / feature set. Instead, developers simply set certain options based on the feature set of the hardware.
DirectX 12 and 11.3 New API Features:
Clearly, we don’t know every single feature that’ll make its way into DX12 at the time of release, simply because its still in developer. But with that said, Microsoft have revealed and detailed several rather key features for their next API. From what we know currently, these features will work over both APIs (the updated DX11 and the new and shiny DX12).
Typed UAV Load
The first new feature to Direct3D we’ll discuss is the rather un-snazzily named Typed UAV Load. UAV’s (Unordered Access Views) are a special type of buffer, which allows you read / write from multiple threads without causing memory issues. This is totally different from say a Pixel Shader which can write to one location per render target (and that is its own corresponding pixel). Typed UAV Load goes ahead and attempts to address issues that are created (mostly restrictions) that’s currently in DX.
Volume Tiled Resources
Next up, we’ll discuss Volume Tiled Resources. VTR (to give it an easier name) might have a familiar sounding name already – Tiled Resources, or as others call it MegaTexturing. The “Volume” in the name gives you a hint of how Microsoft have improved Tiled Resources, by pushing them to the third dimision.
This technique is primarily aimed at voxels (volumetric pixels). The idea is simple enough – if a tile doesn’t contain information that’s useful it wont be allocated, thus improving efficiency by neither taking up the memory bandwidth or the space in RAM for their creation.
This is all about accuracy, it allows developers to see whether or not a polygon covers part of a pixel. Typically, there’s a quick test that’s performed by the game engine to see if the center of the pixel is ‘bounded’ by the lines from the polygon. Conservative Rasterization is more expensive as instead, it checks versus the corners of the pixel. So, if a polygon didn’t quite meet the center of the pixel, this technique would spot that while otherwise it’d be missed by the regular rasterizer.
it is going to be useful in a variety of different areas, including collision detection, tiling and the like. Let’s face it, there’s nothing worse than when you see geometry not quite acting as it should. Hello Mr. Scary monster, your limb poking through the door isn’t giving me a hint there’s anything scary hiding in there or anything. Oh, why am I loading my shotgun? Oh nothing, nothing at all.
Rasterizer Ordered Views
The name once again provides a good hint to what this does, providing the developer control over the order elements are rasterized in a scene. This ensures scene elements in the game are drawn in the correct order and there are fewer errors. This ties in very well with UAV’s (which we’ve discussed above), as they’re created in whichever order they were first finished. Clearly that’s not necessarily the same way that they should be laid out in the scene, and so being able to control that everything is shown correctly is extremely important.
If you need a visual aid and you’ve ever used photoshop, just think how different a composition can look if you change the order of a layer or two. An element in the foreground can now be cut off, or in the background, or an effect might not show properly. The same basic concept extends here. While there are safety measures in places, such as occlusion and so on, it can still slow down the creation of the scene – or create errors.
Order Independent Transparency
If we’re still using photoshop as an analogy, then think of OIT as blending controls. This allows elements to be blended together for the right result no matter the order they’re created in. Think of it as pouring blue paint in the pot and then yellow, or yellow and then blue. The end result should be the same while mixed. With graphics that’s not always the case, and this helps to control that. DX11 did technically create OIT, but there were major speed issues. While it was great for say CAD (Computer Aided Design work) or high end 3d rendering, it wasn’t really useful to game developers as it had a fairly negative impact on the speed of the scene.
This isn’t just about ensuring that say lighting in a scene looks great, but also can be used in certain Anti-Aliasing. Imagine how much more powerful AA could be if there there was even further control over how it was blended.
What about other DX12 features?
We’ve discussed D3D 12 features previously (head to the second page if you wish to view only the feature set info), but these DX11.3 and DX12 shared features provide insight into Microsoft’s plans for DX11. They have always made it quite clear they don’t plan for DX12 to completely take over, and at GDC made it abundantly clear they are indeed planning to offer the best of both worlds. That is a higher level of abstraction for studios which require less performance, or have fewer staff or a lower level of a technical knowledge.
On the other side of the fence is the full DX12 experience, which will provide improvements in multithreading, low level API access and more. This will not only benefit desktop PC’s with increased performance, but drastically cut down on power consumption too. Intel handily demonstrated this when they shown off DX12 running on a Surface Pro 3. A 70 percent increase in performance, sure, but a 50 percent reduction in power usage along with it.