Reprinted please indicate the source for the klayge game engine, this article address for http://www.klayge.org/2011/05/19/anti-alias%e7%9a%84%e5%89%8d%e4%b8%96%e4%bb%8a%e7%94%9f%ef%bc%88%e4%b8%89%ef%bc%89%ef%bc%9ahybird-aa/
The previous article introduced several post process-based AA methods. Is it possible to combine post process AA with hardware AA? This article is about hybrid aa.
First of all, we can see from the comparison figure below for msaa computing waste:
Edge to be calculated by msaa
Calculate the edge of AA
With this comparison, we should have an intuitive experience. msaa actually wasted a lot of computing workload on the pixels that actually do not need AA. If the number of samples is high, the waste will be more serious.
All the post process-based methods mentioned in the previous article are actually doing one thing: trying to use pixel information to estimate the sub-pixel-level ry and then doing AA. Edge AA is estimated by independent points. MLAA is estimated by the lform, while fxaa and dlaa are estimated by line segments. The method of hybrid aa is to express why we need to "Estimate", instead of simply saving the sub-pixel ry first?
Sraa
Subpixel reconstruction anti-aliasing is a new approach published by NVIDIA researchers at i3d2011. It places the fact that the shading variation frequency is generally lower than the ry variation frequency, so it can be shading at a lower resolution, and restoring the ry with a higher resolution. The basic process of sraa is to render a high-resolution (or G-buffer with msaa) in the deferred shading framework, however, shading is only performed in normal resolution (or without msaa. The accumulated Results Use G-buffer to reconstruct sub-pixel information for AA calculation similar to MLAA. This method combines msaa and MLAA, but it can be achieved with a higher number of samples without increasing the calculation workload of shading. Sraa can only be used in the deferred framework due to its principles (but this is not a big problem for modern Games ).
Gpaa
Geometric post-process anti-aliasing is an independent aA method proposed by humus. The basic idea is to render the ry here in the box mode. At this time, we can get the coverage rate of each triangle in each pixel:
Through this coverage rate, it is easy to calculate AA, and the results are compared as follows:
The cost of this method is that it is rendered over a box, but it can be used in two frameworks: Forward and deferred. For the cup, humus Twitter said that this method was actually patented by someone else in 1996.
Adaptive AA
Intel mentioned a very simple and violent aA method on course deferred rendering for current and future rendering pipelines in Siggraph 2010, where per-sample computing in edge, in the non-edge area, perform per-pixel computing. Like the post process-based method, this requires an edge detection to be executed and marked in stencer, and then the calculation can be done separately. The red line is marked with the detected edge:
The result of this method is the same as that of ssaa, and there is no problem with repeated msaa calculation.
Summary
Hybrid aa combines the advantages (or disadvantages) of hardware AA and post process AA ). The advantage is that the same effect can be achieved with the memory overhead and computing workload lower than the hardware AA. The disadvantage is that you need to modify the original graphic rendering pipeline.
This series summarizes three types of space AA methods, which are helpful to you.