液晶与显示, 2015, 30 (1): 163, 网络出版: 2015-04-14
基于Wu反走样的三角形光栅化边缘反走样算法
Edge anti-aliasing algorithm of triangle rasterization based on Wu algorithm
摘要
对于光栅化的三角形,其边缘存在明显的锯齿现象,因此需要进行反走样处理.基于Wu直线反走样算法的思想,考虑了水平直线外侧直接添加插值点的算法和三角形三边外侧反走样的算法.综合两者的优点,在绘制光栅化的三角形的同时,边缘叠加Wu反走样直线,并考虑背景像素灰度值的作用.结果表明,改进的三角形光栅化的边缘反走样算法有效提高了三角形光栅化后边缘的显示效果,该算法计算量小,便于FPGA实现,可用于对图形显示质量要求很高的机载显示系统.
Abstract
Anti-aliasing of the triangle rasterization whose edge has ladder phenomenon obviously is proposed in this paper.The method of adding interpolation points outer the horizontal and the method of anti-aliasing line unilateral are discussed,based on Wu anti-aliasing algorithm.The advantages of both methods are considered in order to draw triangle rasterization.Wu anti-aliasing line is overlaid for the edge at the same time.And the gray value of background pixel is under consideration.The result shows that the improved edge anti-aliasing algorithm of triangle rasterization effectively improves the display of the triangle rasterization edge.The principle is simple and it is easy to implement on FPGA.Therefore the improved algorithm can be applied to cockpit display system which needs high display quality urgently.
吴连慧, 周建江, 夏伟杰, 陈雅雯. 基于Wu反走样的三角形光栅化边缘反走样算法[J]. 液晶与显示, 2015, 30(1): 163. WU Lian-hui, ZHOU Jian-jiang, XIA Wei-jie, CHEN Ya-wen. Edge anti-aliasing algorithm of triangle rasterization based on Wu algorithm[J]. Chinese Journal of Liquid Crystals and Displays, 2015, 30(1): 163.