The #-Filter Anti-Aliasing Based on Sub-Pixel Continuous Edges
Abstract
:1. Introduction
- A novel method of edges detection is proposed. Edge pixels are determined by probability statistics and the object’s location in the view frustum. It can fill in the stencil buffer to identify whether it is an edge pixel. Normal pixels can be shaded quickly to improve the whole rendering performance.
- The continuous sub-pixel edges are reconstructed by the #-filter method according to the whole geometry edges. Only one sub-pixel covered by fragment is processed to reconstruct the continuous edges and minimize the calculation overhead.
- The hardware anti-aliasing with deferred shading works with our algorithm to increase the flexibility and extensibility. Moreover, the normal and edge pixels are independently and adaptively shaded to solve shading thread consistency.
2. Related Work
3. Algorithm and Features
- Generate G-Buffer with MSAA: G-Buffer only stores necessary information to reduce calculation overhead, especially anti-aliasing and transparency rendering information.
- Determine edge pixels: The geometry edges are determined on the sub-pixel. Moreover, the normal pixels and edge pixels are separated. It mainly takes advantage of the Chebyshev inequality to adaptively detect the edges from the probability statistic and the position in the view frustum.
- Reconstruct continuous edges: The continuous geometry edges are reconstructed from the sub-pixel-level and a whole. Furthermore, edge pixels covered only one fragment will be restored, which will maximize the performance without reducing the rendering effect.
- Adaptively shading: The edge pixels of adaptive can effectively reduce calculation overhead and improve anti-aliasing quality. Meanwhile, the normal pixels are quickly shaded.
3.1. Render Scene Geometry to G-Buffer
- Coverage information: The G channel of the RT2 stores coverage, which is the sample mask of each sub-pixel with MSAA, as shown in Figure 2. The geometry edges usually happen in more than one unique fragment (see Figure 2c), and one sub-pixel covered by one fragment (see Figure 2d), rather than no fragment pixel (See Figure 2a) or all covered by one fragment (see Figure 2b).
- Depth information: The non-linear depth will result in higher accuracy near the camera but lower accuracy far away from the camera. We make a linear transform for the non-linear depth () under the perspective projection, as in (1). Meanwhile, linear depth helps to eliminate the z-fighting (depth struggle over the same depth) caused by far away from the camera. Moreover, the actual 3D pixel position can be calculated through the depth and the parameters of the viewport projection matrix (2).The B channel of the RT1 stores the transparent mask. It can effectively handle the geometry aliasing. The alpha value processes the rendering of the transparent object. Meanwhile, R and G channels only store X and Y components of the normal, so the Z component can be restored through Equation (3), where x and y are normalized values of normal X and Y components. Some of the other channels for rendering targets store scene color information such as colors, lighting, and shadows.
3.2. Separate Normal and Edge Pixels
3.3. Reconstruct Continuous Edge and Adaptively Shade
4. Results
5. Conclusions and Future Work
Author Contributions
Funding
Conflicts of Interest
References
- Jimenez, J.; Gutierrez, D.; Yang, J.; Reshetov, A.; Demoreuille, P.; Berghoff, T.; Perthuis, C.; Yu, H.; McGuire, M.; Lottes, T.; et al. Filtering approaches for real-time anti-aliasing. ACM SIGGRAPH Courses 2011, 2, 4. [Google Scholar]
- Chajdas, M.G.; McGuire, M.; Luebke, D. Subpixel reconstruction antialiasing for deferred shading. In Proceedings of the Symposium on Interactive 3D Graphics and Games, San Francisco, CA, USA, 18–20 February 2011; pp. 15–22. [Google Scholar]
- Maule, M.; Comba, J.L.; Torchelsen, R.; Bastos, R. Transparency and anti-aliasing techniques for real-time rendering. In Proceedings of the 2012 25th SIBGRAPI Conference on Graphics, Patterns and Images Tutorials, Ouro Preto, Brazil, 22–25 August 2012; IEEE: Ouro Preto, Brazil, 2012; pp. 50–59. [Google Scholar]
- Clarberg, P.; Toth, R.; Munkberg, J. A sort-based deferred shading architecture for decoupled sampling. ACM Trans. Graph. (TOG) 2013, 32, 1–10. [Google Scholar] [CrossRef]
- Haeberli, P.; Akeley, K. The accumulation buffer: Hardware support for high-quality rendering. ACM SIGGRAPH Comput. Graph. 1990, 24, 309–318. [Google Scholar] [CrossRef]
- Iourcha, K.; Yang, J.C.; Pomianowski, A. A directionally adaptive edge anti-aliasing filter. In Proceedings of the Conference on High Performance Graphics 2009, New Orleans, LA, USA, 1–3 August 2009; pp. 127–133. [Google Scholar]
- Young, P. Coverage Sampled Antialiasing; NVIDIA Corporation Technical Report; NVIDIA Corporation: Santa Clara, CA, USA, 2006. [Google Scholar]
- Wang, Y.; Wyman, C.; He, Y.; Sen, P. Decoupled coverage anti-aliasing. In Proceedings of the 7th Conference on High-Performance Graphics, Los Angeles, CA, USA, 7–9 August 2015; pp. 33–42. [Google Scholar]
- Bloomenthal, J. Edge inference with applications to antialiasing. ACM SIGGRAPH Comput. Graph. 1983, 17, 157–162. [Google Scholar] [CrossRef]
- Salvi, M.; Vidimče, K. Surface based anti-aliasing. In Proceedings of the ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games, Costa Mesa, CA, USA, 9–11 March 2012; pp. 159–164. [Google Scholar]
- Holländer, M.; Boubekeur, T.; Eisemann, E. Adaptive supersampling for deferred anti-aliasing. J. Comput. Graph. Tech. (JCGT) 2013, 2, 2. [Google Scholar]
- Crassin, C.; McGuire, M.; Fatahalian, K.; Lefohn, A. Aggregate G-buffer anti-aliasing. In Proceedings of the 19th Symposium on Interactive 3D Graphics and Games, San Francisco, CA, USA, 27 February–1 March 2015; pp. 109–119. [Google Scholar]
- Sung, M.; Choi, S. Selective Anti-Aliasing for Virtual Reality Based on Saliency Map. In Proceedings of the 2017 International Symposium on Ubiquitous Virtual Reality (ISUVR), Nara, Japan, 27–29 June 2017; IEEE: Nara, Japan, 2017; pp. 16–19. [Google Scholar]
- Nah, J.H.; Ki, S.; Lim, Y.; Park, J.; Shin, C. AXAA: Adaptive approximate anti-aliasing. In ACM SIGGRAPH 2016 Posters; ACM: New York, NY, USA, 2016; p. 51. [Google Scholar]
- Andreev, D. Directionally localized anti-aliasing (DLAA). In Game Developers Conference; GDC: San Francisco, CA, USA, 2011; Volume 2, p. 4. [Google Scholar]
- Reshetov, A. Morphological antialiasing. In Proceedings of the Conference on High Performance Graphics 2009, New Orleans, LA, USA, 1–3 August 2009; pp. 109–116. [Google Scholar]
- Jimenez, J.; Masia, B.; Echevarria, J.I.; Navarro, F.; Gutierrez, D. Practical Morphological Antialiasing. In GPU Pro 360 Guide to Rendering; AK Peters/CRC Press: Boca Raton, FL, USA, 2018; pp. 135–153. [Google Scholar]
- Biri, V.; Herubel, A.; Deverly, S. Practical morphological antialiasing on the GPU. In ACM SIGGRAPH 2010 Talks; ACM: New York, NY, USA, 2010; p. 1. [Google Scholar]
- Lottes, T. Fxaa. In White Paper; NVIDIA Corporation Technical Report; Nvidia: Santa Clara, CA, USA, February 2009. [Google Scholar]
- Malan, H. Distance-to-edge anti-aliasing. In ACM SIGGRAPH Courses Presentation; ACM: New York, NY, USA, 2011. [Google Scholar]
- Jimenez, J.; Echevarria, J.I.; Sousa, T.; Gutierrez, D. SMAA: Enhanced subpixel morphological antialiasing. In Computer Graphics Forum; Wiley Online Library: Hoboken, NJ, USA, 2012; Volume 31, pp. 355–364. [Google Scholar]
- Persson, E. Geometric Post-Process Anti-Aliasing. 2011. Available online: http://humus.name/index.php (accessed on 3 February 2020).
- NVIDIA. Antialiased Deferred Rendering. Available online: http://docs.nvidia.com/gameworks/content/gameworkslibrary/graphicssamples/d3d_samples/antialiaseddeferredrendering.htm (accessed on 3 February 2020).
- Du, W.; Feng, J.; Yang, B. Sub-Pixel Anti-Aliasing Via Triangle-Based Geometry Reconstruction. In Computer Graphics Forum; Wiley Online Library: Hoboken, NJ, USA, 2014; Volume 33, pp. 81–90. [Google Scholar]
- Schied, C.; Peters, C.; Dachsbacher, C. Gradient estimation for real-time adaptive temporal filtering. Proc. ACM Comput. Graph. Interact. Tech. 2018, 1, 1–16. [Google Scholar]
- Yang, L.; Liu, S.; Salvi, M. A Survey of Temporal Antialiasing Techniques. STAR 2020, 39. Available online: https://behindthepixels.io/assets/files/TemporalAA.pdf (accessed on 9 February 2020). [CrossRef]
- Bazazian, D.; Casas, J.R.; Ruiz-Hidalgo, J. Fast and robust edge extraction in unorganized point clouds. In Proceedings of the 2015 International Conference on Digital Image Computing: Techniques and Applications (DICTA), Adelaide, Australia, 23–25 November 2015; IEEE: Adelaide, Australia, 2015; pp. 1–8. [Google Scholar]
- Yang, B.; Dong, Z.; Feng, J.; Seidel, H.P.; Kautz, J. Variance soft shadow mapping. In Computer Graphics Forum; Wiley Online Library: Hoboken, NJ, USA, 2010; Volume 29, pp. 2127–2134. [Google Scholar]
- Marrs, A.; Spjut, J.; Gruen, H.; Sathe, R.; McGuire, M. Adaptive temporal antialiasing. In Proceedings of the Conference on High-Performance Graphics, Vancouver, BC, Canada, 10–12 August 2018; pp. 1–4. [Google Scholar]
- McGuire, M. Computer Graphics Archive. 2017. Available online: https://casual-effects.com/data (accessed on 12 August 2020).
Render Target | R Channel | G Channel | B Channel | A Channel |
---|---|---|---|---|
RT0 | Color R | Color G | Color B | Alpha |
RT1 | Normal R | Normal G | Transparency mask | Alpha |
RT2 | Depth | Coverage | —– | —– |
RT3 | Light R | Light G | Light B | Alpha |
RT4 | Shadow R | Shadow G | Shadow B | Alpha |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Luo, D.; Zhang, J. The #-Filter Anti-Aliasing Based on Sub-Pixel Continuous Edges. Mathematics 2020, 8, 1655. https://doi.org/10.3390/math8101655
Luo D, Zhang J. The #-Filter Anti-Aliasing Based on Sub-Pixel Continuous Edges. Mathematics. 2020; 8(10):1655. https://doi.org/10.3390/math8101655
Chicago/Turabian StyleLuo, Dening, and Jianwei Zhang. 2020. "The #-Filter Anti-Aliasing Based on Sub-Pixel Continuous Edges" Mathematics 8, no. 10: 1655. https://doi.org/10.3390/math8101655
APA StyleLuo, D., & Zhang, J. (2020). The #-Filter Anti-Aliasing Based on Sub-Pixel Continuous Edges. Mathematics, 8(10), 1655. https://doi.org/10.3390/math8101655