At GDC 2013, Intel has revealed some details of its 4th Gen Core Processors, including details about their upcoming graphics processors features (all Intel Core processor comes with a graphics processor or integrated GPU inside). Not surprisingly, DirectX 11.1 is supported, but what was not expected was that Intel actually extended upon the DX11 specifications to include two new features: Instant Access and PixelSync. Instant Access provides a more straightforward, more convenient and faster way to access the GPU memory, PixelSync does provide a more fundamental improvement in how computer graphics work and performs, especially when it comes to handling transparency.
Transparency? Why is it so hard?
When dealing with hardware-accelerated computer graphics, transparency has always been problematic because you basically need to draw things in a certain order to make sure that the transparency computations are performed properly. The most common way to solve this is to sort polygons, so that you draw them starting with those that are the farthest away from the viewer, this is called “back-to-front” rendering. As transparent pixel overlap others, we can use their transparency level to blend colors that are directly “behind”.
While the principle doesn’t sound so bad, the reality is that there are a lot of corner cases when polygon intersect or overlap. This also requires a lot of additional work for the application (or for game artists!), as it may force developers to break down objects in smaller pieces, which adds overhead in the API (DirectX or OpenGL) and the hardware.
Over the years, all kinds of solutions have been proposed, but were never practical enough to become “production-ready” in video games. Examples are the depth-peeling technique, or the more accurate Abuffer per-pixel linked-list. Both are very computationally expensive. The former was interesting but ultimately not good enough for general use, and the latter had issues with potentially running out of memory. In the meantime, developers tweaked polygon sorting or simply avoided using transparency whenever possible.
Intel’s Adaptive Order-Independent Transparency
That’s where Intel’s new Adaptive Order-Independent Transparency (AOIT) comes into play. The Intel research team lead by Aaron Lefohn has come up with a practical solution to this problem. With Intel’s AOIT, there is no need to sort because it is done at the pixel level at the end of the graphics pipeline, and there is no risk of running out of memory because it uses a fixed-size buffer, which is not trivial since you never know how many transparent elements can land on one screen pixel. There is no need to render the geometry multiple times (see depth-peeling). In essence, it basically allows developers to not worry about transparency anymore and let the hardware take care of it. The only thing required is to tell the hardware when polygons are supposed to be transparent – that’s it.
Since it just came out yesterday, I haven’t had time to try the SDK for myself, but from what I can tell, this is really a few lines of code in the shader (shader = piece of code that handles pixels rendering), so I’m guessing that developers will use this since it’s so easy to integrate.
How does it work?
The details are quite geeky, but here’s what I came away with from the Intel presentation: regardless of how many overlapping transparent pixels there are, the way light is absorbed along the way can be represented by a function (see below). Intel’s method works by approximating that function with much less samples, and by using pairs of nodes to “vectorize” (or “compress”) the function even further. Intel calls this an Approximate Visibility Function or “AVF”. (if you’re really into it, read their slides from last year’s GDC. They don’t represent today’s Intel AOIT, but provide good visuals to understand the principles)
The way Intel is doing this is really smart because unlike linked-lists where pixels are “stacked” one on top of another in a potentially infinite way (this could cause serious memory issues), Intel’s method of using pairs of nodes allows them to control the maximum amount of memory used to keep track of the transmittance. Nodes are also inserted directly at the proper location, thus avoiding further sorting cycles.
Normally, there is a also list of colors that need to be computed with the transmittance factor to obtain the final color. Intel has confirmed to me that there is “no memory size guess” at all, which makes this technique superior to the A-buffer linked-list algorithm. At this point, I’m not sure how Intel has been able to keep the lid on memory usage, but I suspect that they must be collapsing pixels and make an approximation when needed.
The best part is that the number of nodes (which defines the accuracy) is not restricted in the hardware, but is defined by the game developer. This means that hardware with more graphics memory can benefit from greater accuracy. Finally, it should be noted that this technique could also be very useful to render things that translucent (not “see-through” but let light go through), like smoke, hair etc.
Not quite perfect yet
For all its advantages, Intel’s new AOIT still leaves a few things for game developers to mull over. For example it may not get along well with current anti-aliasing techniques. Also, objects that are rendered using a deferred lighting engine would not be compatible with this, since deferred lighting prevents Intel’s AOIT to know what the final color is, since it is computed in multiple render-passes. Many high-profile games use deferred rendering…
This can hardly be blamed on Intel, but at this time, no other GPU vendor supports this feature, and because this is deeply integrated into the rendering pipeline, I don’t think that either NVIDIA or AMD would come up with a feature-compatible hardware in the next 12 months. We’ll see. I hope that others will support this extension down the road, but in the meantime, the code changes seem easy enough that developers are likely to use this whenever possible.
Conclusion: surprising, refreshing and very smart
While it this solution is not a panacea to all transparency problems, Intel’s AOIT is likely the most elegant high-performance solution to a computer graphics problem that is near mythical. In my view, it offers a practical solution for a lot of transparency effects that may involve hair, leaves, particles of all kinds and many more use cases, that should improve the visual quality of games, and save on game development time. It is also fair to point out that other solutions to render comparably nice smoke or hair already exist for GPUs without AOIT, but they require more work and complexity.
Beyond the pure technology feat, I feel that Intel is now taking computer graphics seriously, and I mean “really”. Sure, the company has been the #1 GPU vendor (in unit shipped) for years, but before yesterday, I hardly thought of Intel as a computer graphics innovator. This perception has changed somewhat, and I think that others would share my point of view.
Of course, perceptions are fluid and Intel needs to keep this going, but I’m very hopeful that that it will, because the company is accumulating more and more great “graphics people”. I don’t expect Intel to produce a 7-billion transistors GPU any time soon, but you don’t need to produce the fastest GPU to make a mark in computer graphics history — Intel’s AOIT proves it.RELATED