为了解决图形处理过程中出现的锯齿问题,提出了一种高效的光线追踪等价划分反锯齿算法。算法通过计算相邻像素采样点间颜色偏差,对偏差超过阈值的边界采样点进行递归划分为更小的不规则区域;对偏差小于阈值的采样点不进行分解,用中点颜色取代区域颜色,保证反锯齿效果同时减少采样点的个数。经过仿真实验表明,该算法反锯齿效果与超采样反锯齿效果相同,但采样点数减少39.70%,计算效率提高43.26%。使用方法能够在光线追踪图形处理过程中获得较好的反锯齿效果,同时减少了采样点数。
In order to solve the jagged edges problem in graphics processing algorithm, this paper proposed an anti-aliasing al- gorithm for ray tracing. By using the recursive method, it subdivided the boundary pixel. For the color deviation was more than threshold, small square region substituted the irregular edge region. At the same time, for the color deviation was less than threshold in the edge region, it was not subdivided. The color of midpoint substituted the color of region. Through simulation, the algorithm has the same result as the MSAA, but the numbers of sampling points reduce 39.70% and the computational efficiency improves 43.26%. This algorithm can achieve a better anti-aliasing effect and less sampling points.