# Multiple-Parallel Morphological Anti-Aliasing Algorithm Implemented in FPGA
## 1 Introduction  
In the process of GPU 3D rendering, since the computer screen contains a limited number of pixels, we can only use a limited number of pixels to represent the 3D graphics. Due to the lack of sampling points, the edge of the image will contain jagged patterns such as wavy, circular, and flickering patterns, which seriously affect the quality of the image. To improve image quality, many anti-aliasing techniques have been proposed. The Super Sampling Anti-Aliasing (SSAA) technique is one of them [1; 2; 3; 4]; this technique increases the resolution of the image greatly by increasing the number of sampling points of each pixel. However, when this technique is implemented, the fragment shader needs to progress on all sampling points of each pixel, which increases the hardware complexity and power consumption. To reduce hardware complexity, the Multiple Sampling Anti-Aliasing (MSAA) technique was put forward [5; 6; 7; 8; 9; 10; 11; 12]. By counting the sampling points covered by the primitive in each pixel, we can calculate the anti-aliasing color of the pixel according to the coverage of the sampling points and the original color of the pixel. When this technique is implemented, the fragment shader only needs to progress on each pixel, which greatly reduces the hardware complexity compared with SSAA. In addition, since the technique uses the same number of sampling points as SSAA in each pixel, the technique can achieve the same anti-aliasing performance as SSAA. To further achieve more color gradients without increasing the number of color buffers, the Enhanced Quality Anti-Aliasing (EQAA) technique and Coverage Sampling (CSAA) technique are proposed [13; 14; 15; 16]. EQAA and CSAA are two similar technologies implemented for AMD and NVIDIA, respectively. They use more sampling points than the number of color buffers, and by counting the coverage of these sampling points, they can improve the precision of the color with the same size of color buffers. Unfortunately, however, the aforementioned techniques are only applicable to the real-time 3D rendering pipeline. Although this rendering pipeline can achieve very good anti-aliasing performance, it consumes a large number of hardware resources inside the GPU during rendering, and the GPU will therefore generate high-power consumption. For embedded mobile devices, they have strict power consumption limits, so this high-power consumption rendering pipeline is not suitable for them. To meet the low-power consumption requirements of mobile embedded devices [17], we can use the deferred 3D rendering pipeline [18], and to improve its image quality, some image post-processing techniques are proposed [19]. The Fast Approximate anti-aliasing (FXAA) technique is one of them [20, 21]; this technique improves the image quality without complicated calculations through the methods of edge detection and pixel blending. Although this technique occupies very few system resources, the image quality presented by this technique is very poor, and the border of the image still has obvious jagged shapes. To improve the jagged shape of the image edge, the Morphological Anti-Aliasing (MLAA) technique and the Enhanced Subpixel Morphological Anti-Aliasing (SMAA) technique are proposed. Based on FXAA, MLAA improves the accuracy of pixel blending weight coefficient calculation by further dividing the edge of the image into different aliasing patterns, which also improves the accuracy of the pixel anti-aliasing color calculation results [22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]. SMAA adds steps such as corner detection based on MLAA to further improve the anti-aliasing performance of the image, but it also further increases the complexity of the hardware [33]. The FidelityFX Super Resolution (FSR) technique is another image post-processing technique proposed by AMD [34]; it contains two steps: one is the Edge Adaptive Spatial Upsampling, and the other is the Robust Contrast Adaptive Sharpening.